Page 1 of 1

how to add new locale to servoy

PostPosted: Mon Oct 05, 2009 10:26 am
by amchtwe
Hi,

I'm Aung Mon and Now i'm in Yangon, Myanmar.

I'm working on servoy i18n features.

I want to display my servoy label with "Myanmar" language.

But in the servoy i18n I couldn't add myanmar locale.

So could you pls let me know whether i can add New Local to servoy or not.

and if it is possible pls let me know how to do ??

Thanks

Aung Mon

Re: how to add new locale to servoy

PostPosted: Mon Oct 05, 2009 11:09 am
by lvostinar
Servoy uses the java locales, which uses a standard. Here is a list of languages and their code: http://ftp.ics.uci.edu/pub/ietf/http/related/iso639.txt . Is the language you want there ? Or try : http://www.inter-locale.com/LocalesDemo.jsp to see what locale Java sees ( your OS should be set to correct locale).

Re: how to add new locale to servoy

PostPosted: Mon Oct 05, 2009 11:38 am
by amchtwe
Hi

Thanks indeed for your quick reply.

when i check your URL, I found the locale that i want in the

http://ftp.ics.uci.edu/pub/ietf/http/related/iso639.txt

that is "my - burmese".

But I couldn't find my locale in

http://www.inter-locale.com/LocalesDemo.jsp

so what i have to do next??

Thanks

Aung Mon

Re: how to add new locale to servoy

PostPosted: Mon Oct 05, 2009 12:12 pm
by lvostinar
Hmm, not sure if Java has (full) support for that locale. I understand the locale you need is my_mm. In the preferences we just display the provided locales from Java. You can open a case and we'll have a closer look if we can fix this.

Re: how to add new locale to servoy

PostPosted: Thu Aug 07, 2014 4:02 pm
by koen1330869547
Hi,
Does anyone knows if
Luxembourgish
ISO 639-1 lb
ISO 639-2 ltz
ISO 639-3 ltz
can be added to the locales in Servoy?
Thanks.

Re: how to add new locale to servoy

PostPosted: Fri Aug 22, 2014 6:04 pm
by koen1330869547
Anyone? A little help for Luxembourg...
Thanks.

Re: how to add new locale to servoy

PostPosted: Thu Aug 28, 2014 11:38 am
by ROCLASI
Hi Koen,

According to following blog there are only fr_LU and de_LU locals in Java.
http://viralpatel.net/blogs/java-locale-list-tutorial/

Re: how to add new locale to servoy

PostPosted: Wed Sep 03, 2014 7:26 pm
by koen1330869547
Thanks Robert for you help, it did work at the end ;)

So how to add another language into the i18n:

When in Eclipse you edit the i18n messages for example: French, Luxembourg (fr_LU), there will be a file generated (Mac):
    "/servoy_workspace/resources/messages/mySolution.i18n.fr_LU.properties"
You can access this file via the Eclipse - Navigator:
    "/ressources/messages/mySolution.i18n.fr_LU.properties"
and copy/paste a new
    "mySolution.i18n.lb_LU.properties",
because the official, but not existing, code is "lb_LU" (Luxembourgish, Luxembourg)
but you could even try the official, but not existing, code "sy_SL" (Servoyanish,ServoyLand) and create the "mySolution.i18n.sy_SL.properties" 8)

You have to copy/paste this file in Eclipse so Eclipse will know there is another file. If you do it in the finder (Mac) you have to drag the file into the "navigator" of Eclipse to get the same result.
:!: You will NOT be able to select this language in the i18n editor to get started adding the messages into this language.
Therefore being in the Eclipse navigator, right-mouse-click the file and select "Open With/Text Editor":
"mySolution.i18n.lb_LU.properties":
Code: Select all
...
mySolution.label.name=Numm
mySolution.label.nameFirst=Virnumm
mySolution.label.nameLast=Familljennumm
mySolution.btn.done=Best\u00E4tigen
mySolution.btn.delete=L\u00E4chen
...
servoy.button.cancel=Zer\u00E9ck
servoy.general.cancel.title=Zer\u00E9ck
...

You can add all the "servoy.*" elements so the whole Servoy-GUI will be in this language.

To set the the language onSolutionOpen:
Code: Select all
function onSolutionOpen() {
         var login_i18n_language = 'lb';
         var login_i18n_country = 'LU';
         i18n.setLocale(login_i18n_language, login_i18n_country);
}