[asterisk-dev] Conflict of cs/cz language codes

Steve Murphy murf at parsetree.com
Mon Nov 16 12:23:05 CST 2009


Pavel--

I've noticed myself that cs and cz are used in the Asterisk source. But it's
not a matter of what seems right...
the code should be from ISO 639-1 if there is a 2-letter language code
there, or ISO-639-2's 3 letter code instead.
"cs" is the correct 2 letter code for Czech. "ces" is the correct 3-digit
code.

I also note that "se" is used for swedish, but really, it should be "sv".
"se" is the 2-letter code for Northern Saami,
spoken in Norway, otherwise known as “Norwegian Lapp”, with 3-digit code
"sme".   The 3-letter code for swedish is
"swe".

I haven't filed any bug report for this yet; you are welcome to; for both
these languages if you want.

The only problem I can see with "fixing" these wrong language codes, is that
those involved will have
to make changes to their source/dialplans/whatever, or they suddenly will
find that things aren't
quite working right anymore. But a conflict (cs vs. cz) is a conflict and
really should be fixed, in 1.4, 1.6.x and trunk,
and everyone will just have to adapt. While sv vs. sw is apparently not yet
a conflict, someday, the true owners
of se will want to provide translations, and then there will be a conflict
also. Might as well get it straightened out
now.

murf


On Mon, Nov 16, 2009 at 10:14 AM, Pavel Troller <patrol at sinus.cz> wrote:

> Hi there,
>  I've found that we have (at least in 1.6.1 branch) a conflict in language
> codes for the Czech language.
>  - app_voicemail.c requires the "cz" code to activate the Czech voicemail
>    syntax rules. It doesn't work if the "cs" code is used (it is not used
>    anywhere in the code).
>  - say.c contains the following:
>
>         } else if (!strncasecmp(language, "cz", 2)) { /* deprecated Czech
> syntax */
>                static int deprecation_warning = 0;
>                if (deprecation_warning++ % 10 == 0) {
>                        ast_log(LOG_WARNING, "cz is not a standard language
> code.  Please switch to using cs instead.\n");
>                }
>                return ast_say_number_full_cs(chan, num, ints, language,
> options, audiofd, ctrlfd);
>
>  but if the user follows the request, the voicemail stops speaking
> properly.
>  So, which language code should be preferred ? I think that cz is better,
> becaus cs means "CzechoSlovak" and we don't have such entity anymore,
> Slovakia
> has its own "sk" code, so it should be okay to use cz for Czech...
> With regards,
>  Pavel Troller
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-dev
>



-- 
Steve Murphy
ParseTree Corp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20091116/930b9541/attachment.htm 


More information about the asterisk-dev mailing list