B4J Question B4J - Internationalization of application (Locale)

Discussion in 'B4J Questions' started by agb2008, Mar 29, 2015.

  1. agb2008

    agb2008 Member Licensed 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...
     
  2. Erel

    Erel Administrator Staff Member Licensed 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.
     
  3. tdocs2

    tdocs2 Well-Known Member Licensed User

    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
     
  4. Enrique Gonzalez R

    Enrique Gonzalez R Well-Known Member Licensed User

    Hi again.

    to get the language and country:

    Code:
    getsystemproperties(user.country,"DEFAULT")
    getsystemproperties(user.language,
    "DEFAULT")
    and to set them:

    Code:
    setsystemproperties(user.country,"DEFAULT")
    setsystemproperties(user.language,
    "DEFAULT")
     
    tdocs2 likes this.
  5. tdocs2

    tdocs2 Well-Known Member Licensed User

    Thank you, Enrique.

    Any way to get currency symbol and format?

    Best wishes.

    Sandy
     
  6. tdocs2

    tdocs2 Well-Known Member Licensed User

    Enrique,

    Code:
    Log(GetSystemProperty("user.country","DEFAULT"))

    Log(GetSystemProperty("user.language","DEFAULT"))

    Thanks.

    Sandy
     
    Last edited: Aug 6, 2015
    Erel and Enrique Gonzalez R like this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice