[asterisk-dev] Conflict of language codes

Steve Murphy murf at parsetree.com
Mon Nov 16 15:21:30 CST 2009


John--

I don't think, at this stage of the game, that trying to so switch over to
the
3-character language codes would be a practical one for Asterisk. The
"use-the-
2-character-language-code-if-one-exists-else-use-the-3-char-code" rule
covers
the situation quite well. The 2-char code covers about 200 of the most
"popular"
languages. That leaves the remaining 6700 or so living languages to be
covered
under the 3-char tables.

Seeing as how only Swedish and Czech speakers would be affected, I'd say
that making the corrections, and letting them update their dialplans or
source
preferred language settings to fix the resulting problems will be more
minimal
than waiting another year for a couple hundred/thousand/whatever more
installations
using those languages experience the joy when it does get addressed. Make
big
bold notations in the release notes. Send out notices via the users and dev
lists.
You can try to give them notice. But, they'll update to the new version,
have problems,
debug it, and make the fix, then they'll read the release notes to figure
out why the
change was made, and then kick themselves for not reading the notes first.
That's
the way **I** work, usually ;)

murf




On Mon, Nov 16, 2009 at 1:37 PM, John Todd <jtodd at digium.com> wrote:

> [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<email%3Ajtodd 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/
>
>
>
>
> _______________________________________________
> --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/732a67c9/attachment-0001.htm 


More information about the asterisk-dev mailing list