B4J Question B4J - Internationalization of application (Locale)

agb2008

Member
Licensed User
Longtime User
What's the best way to add support for different languages in B4J app ? In JavaFX Scene Builder
there is an option: Preview -> Internalization -> Set Resources , but I can't find support for Locale,
ResourceBundle or i18nBundle in B4J...
 

tdocs2

Well-Known Member
Licensed User
Longtime User
This APIs are not available in B4J. You will need to create a custom solution. You can use the simple text "map" file for each language.

Thank you, Erel.

How can the app tell the country and language in B4J?

It is not only language - many ways to address that issue (as you point out).

How about currency symbol and number of decimal places? Is there something available in this area?

Sandy
 
Upvote 0

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
Hi again.

to get the language and country:

B4X:
getsystemproperties(user.country,"DEFAULT")
getsystemproperties(user.language,"DEFAULT")

and to set them:

B4X:
setsystemproperties(user.country,"DEFAULT")
setsystemproperties(user.language,"DEFAULT")
 
Upvote 0

tdocs2

Well-Known Member
Licensed User
Longtime User
Thank you, Enrique.

Any way to get currency symbol and format?

Best wishes.

Sandy
 
Upvote 0
Top