[asterisk-dev] Conflict of language codes
John Todd
jtodd at digium.com
Mon Nov 16 14:37:22 CST 2009
[title changed, threading retained]
Hmmm... Good point. This is a serious namespace conflict. The
problem is that it requires fixes for backwards compatibility. Argh.
While the most correct response would be to just move over to
ISO-639-2 standards (three letter language codes) as per the standard
here:
http://www.loc.gov/standards/iso639-2/php/code_list.php
But... sometimes doing the "correct" thing causes more problems than
it resolves. Is there a strenuous opinion from anyone that we should
change? I'd like to solicit opinions. Personally, I'd lean towards
the three-digit codes since it's the better thing to do, but...
This is actually a pretty big change. For instance, all of our
language soundfile distributions have two-letter names. If we go to
three-digit versions, then we either need to symlink the old ones, or
keep the old ones (which then will be slowly falling out of sync), or
delete the old ones (which will cause every distribution to fail
that's already out there, and which will be out there... forever.)
JT
On Nov 16, 2009, at 10:23 AM, Steve Murphy wrote:
> 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
---
John Todd email:jtodd at digium.com
Digium, Inc. | Asterisk Open Source Community Director
445 Jan Davis Drive NW - Huntsville AL 35806 - USA
direct: +1-256-428-6083 http://www.digium.com/
More information about the asterisk-dev
mailing list