2013/12/5 gNewSense Live user <riverchi...@gmail.com>

> On Thu, 2013-12-05 at 16:56 -0500, Felipe Lopez wrote:
> > 2013/12/5 Sam Geeraerts <sam...@elmundolibre.be>
> >         Op Wed, 04 Dec 2013 06:37:46 +0800
> >         schreef gNewSense Live user <riverchi...@gmail.com>:
> >
> >
> >         > Is it possible to add Traditional Chinese(zh_TW) to the
> >         widget?
> >
> >
> >         I believe the language code in the widget is currently limited
> >         to 2
> >         letters.
> >
> >
> > Yes, the widget is limited to ISO 639-1 (2 letter codes) [1]. But I
> > can
> > update it to accept zh_TW, pt_BR, etc.
> >
> >
> > I'll start updating it right now if no one opposes. So what do you
> > say?
>
> May I know how you will update it to accept characters like zh_TW and
> pt_BR?
>

The languages that appear in the translation widget are listed in the
"translation_languages" dictionary [2] defined in the wiki configuration
file. I'll use the language codes in that dictionary to assemble the links
to the appropriate translations of a page.

Basically, I'm not going to check for 2 letter codes in galaxia.py line 293
[3]. I'll just check if the language section is defined in the dictionary.
It doesn't matter what kind of language code is used:

    if section in translation_languages:

I think that will work.


[2]: See point five in http://galaxia.readthedocs.org/en/latest/website.html
[3]:
https://bitbucket.org/sirgazil/galaxia/src/50add0911aec8256cca452745660ee8815b3e481/website-theme/galaxia.py?at=default#cl-293



>
> Thanks.
>
> >
> >
> >
> > [1]: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
> >
> >
> >
> >         _______________________________________________
> >         gNewSense-dev mailing list
> >         gNewSense-dev@nongnu.org
> >         https://lists.nongnu.org/mailman/listinfo/gnewsense-dev
> >
> >
> >
> >
> > --
> > Luis Felipe López Acevedo
> >
> > http://sirgazil.bitbucket.org/
> >
> > _______________________________________________
> > gNewSense-dev mailing list
> > gNewSense-dev@nongnu.org
> > https://lists.nongnu.org/mailman/listinfo/gnewsense-dev
>
>
>
> _______________________________________________
> gNewSense-dev mailing list
> gNewSense-dev@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/gnewsense-dev
>



-- 
Luis Felipe López Acevedo
http://sirgazil.bitbucket.org/
_______________________________________________
gNewSense-dev mailing list
gNewSense-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/gnewsense-dev

Reply via email to