Seems to be good. In the postnuke CMS, we use a 'dictionnary' file for
each language. It can be done like this :
fr_FreevoString = [ "tvguide": "TV Guide", ... ]
en_FreevoString = [ "tvguide": "Programme t�l�", ...]
de_FreevoString = [ ... ]
...
Of course, the variable name is built dynamically by adding the country
string to '_FreevoString'. I think it will be faster than the xml
approach, but (again!?) comments are welcome.
Regards, Sylvain.
> Ok,
>
> Find attached a simple program reading french or english strings
> depending of the value of LANGUE variable.
> The xml file discribing all the strings in Freevo could be like this:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <freevo>
> <string name="tvguide">
> <locale lang="en">TV Guide</locale>
> <locale lang="fr">Programme Télé</locale>
> </string>
> <string name="recordprog">
> <locale lang="en">Recorded Program</locale>
> <locale lang="fr">Programme Enregistré</locale>
> </string>
> <freevo>
>
> Using the attached class, the line 148 in tv.py
> items = [ menu.MenuItem('TV Guide', action=self.start_tvguide),
> would be replace by:
> items = [ menu.MenuItem(xmlparse.strings['tvguide'],
> action=self.start_tvguide),
>
> xmlparse being an instance of the class ParseString. I do not check the
> python gettext module but my experience with C gettext version and all
> .po files is that it sounds more complicate than the proposed solution.
> But I may wrong...
>
> As usual, comments are welcomed.
>
> David
>
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Freevo-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-users