how to add new locale to servoy

Find out how to get things done with Servoy. Post how YOU get things done with Servoy

how to add new locale to servoy

Postby amchtwe » Mon Oct 05, 2009 10:26 am

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
You see things; and you say "Why?"
But I dream things that never were; and I say "Why not?"
amchtwe
 
Posts: 32
Joined: Wed Feb 06, 2008 7:46 am
Location: BKK

Re: how to add new locale to servoy

Postby lvostinar » Mon Oct 05, 2009 11:09 am

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).
Laurian Vostinar
Servoy
lvostinar
 
Posts: 1062
Joined: Tue Feb 19, 2008 10:53 am

Re: how to add new locale to servoy

Postby amchtwe » Mon Oct 05, 2009 11:38 am

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
You see things; and you say "Why?"
But I dream things that never were; and I say "Why not?"
amchtwe
 
Posts: 32
Joined: Wed Feb 06, 2008 7:46 am
Location: BKK

Re: how to add new locale to servoy

Postby lvostinar » Mon Oct 05, 2009 12:12 pm

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.
Laurian Vostinar
Servoy
lvostinar
 
Posts: 1062
Joined: Tue Feb 19, 2008 10:53 am

Re: how to add new locale to servoy

Postby koen1330869547 » Thu Aug 07, 2014 4:02 pm

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.
Koen Cloostermans
User Centered Designer
koen1330869547
 
Posts: 10
Joined: Sun Mar 04, 2012 3:59 pm
Location: Luxembourg

Re: how to add new locale to servoy

Postby koen1330869547 » Fri Aug 22, 2014 6:04 pm

Anyone? A little help for Luxembourg...
Thanks.
Koen Cloostermans
User Centered Designer
koen1330869547
 
Posts: 10
Joined: Sun Mar 04, 2012 3:59 pm
Location: Luxembourg

Re: how to add new locale to servoy

Postby ROCLASI » Thu Aug 28, 2014 11:38 am

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/
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: how to add new locale to servoy

Postby koen1330869547 » Wed Sep 03, 2014 7:26 pm

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);
}
Koen Cloostermans
User Centered Designer
koen1330869547
 
Posts: 10
Joined: Sun Mar 04, 2012 3:59 pm
Location: Luxembourg


Return to How To

Who is online

Users browsing this forum: No registered users and 1 guest