Hi You[1],

I can hopefully push you into the right direction:

Attached you will find a very simple application that should give you the
insights about localization[2]...
If you extract it into the right place it's ready to be compiled. It should
resist in the "application" directory (on the same level as "demobrowser",
"feedreader", "playground", "portal" and "showcase"). In that case the paths
should be O.K.

Now back to the topic:

1. Note that in the config.json (under "let"->"LOCALES") there is an array
   that contains _all_ the locales you wish to use in your application!
2. In the "source/translation" folder there is a .po file for each of those
   locales.
   These files contain the translations (if necessary; Translating English to
   English can be omitted ;) )
   Whenever you add a new translated string[3] into your project you _have_ to
   run 'generate translation'! This updates (or creates) the .po files.
   After that, you can provide the translations (.po files) or leave that for
   later.
   Now you can run 'generate source' or 'generate build' and it will work as
   you expect it.

The "trick" is: You have to mention the locales in the config (1) and you have
to run 'generate translation' whenever you add new translated strings.

Hope this helps,

  Peter


[1] Any name, other than "dragon2kill" ;)
[2] It's a ZIP-File, so rename it to "app.zip". I had to rename it in order to
    get it attached...
[3] the ones that are enclosed by this.tr("...") e.g


On 2010-12-14 17:34 [email protected] wrote:
> i try this to change the languagecode to "de"
> i get
> (qx.locale.Manager.getInstance().getLocale()
> de
> 
> but all others return   the wrong formats:( What is wrong?
> 
> Here the full code
> 
>  qx.locale.Manager.getInstance().setLocale("de");
> alert(qx.locale.Manager.getInstance().getLocale());
> alert(qx.locale.Manager.getInstance().getTerritory());
> alert(qx.locale.Date.getDateFormat("short"));
> alert((new
> qx.util.format.DateFormat(qx.locale.Date.getDateFormat("short"))).format(new
> Date()));
> alert(qx.locale.Date.getDateFormat("medium"));
> alert((new
> qx.util.format.DateFormat(qx.locale.Date.getDateFormat("medium"))).format(new
> Date()));
> alert(qx.locale.Date.getDateFormat("long"));
> alert((new
> qx.util.format.DateFormat(qx.locale.Date.getDateFormat("long"))).format(new
> Date()));
> alert(qx.locale.Date.getDateFormat("full"));
> alert((new
> qx.util.format.DateFormat(qx.locale.Date.getDateFormat("full"))).format(new
> Date()));
> alert(qx.locale.Date.getTimeFormat("short"));
> alert((new
> qx.util.format.DateFormat(qx.locale.Date.getTimeFormat("short"))).format(new
> Date()));
> alert(qx.locale.Date.getTimeFormat("long"));
> alert((new
> qx.util.format.DateFormat(qx.locale.Date.getTimeFormat("long"))).format(new
> Date()));
> alert(qx.locale.Date.getDayName("wide", qx.locale.Date.getWeekStart()));
> alert(qx.util.format.NumberFormat.getInstance().format(10000.12));

Attachment: app.zip.attach
Description: Binary data

------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to