Lernkarten

Karten 102 Karten
Lernende 1 Lernende
Sprache English
Stufe Berufslehre
Erstellt / Aktualisiert 31.08.2017 / 24.10.2017
Lizenzierung Keine Angabe     (Oracle)
Weblink
Einbinden
0 Exakte Antworten 102 Text Antworten 0 Multiple Choice Antworten
Fenster schliessen

What are the main advantages of localizating an application?

  • It can be run worldwide
  • New languages can be added without recompilation
  • Date, currency and messages can be provided conform to end-user
  • Dynamic, translateable text-elements can be stored outside of the code
Fenster schliessen

How can a Locale object for Germany be obtained?

Locale locale = new Locale("de", "DE");

or

Locale locale = Locale.GERMAN(Y);

Fenster schliessen

What does a Locale represent and what is it used for?

It represents a region and is used to format date, currency and messages.

Fenster schliessen

Which parameter type(s) does the Locale constructor accept?

  • language 
  • language, Country
  • language, Country, Variant
Fenster schliessen

Can a Locale for "US" be obtained without passing a language code?

Yes:

By using one of the static constants for standard country locales:

Locale.US

Fenster schliessen

How can the default Locale of the machine be changed to France?

Locale.setDefault(new Locale("fr", "FR"));

or

Locale.setDefault(Locale.FRANCE);

Fenster schliessen

How can the default Locale of the machine be obtained?

Locale.getDefault() 

Fenster schliessen

How can a ResourceBundle object for a file named "MyBundle.properties" be obtained?

ResourceBundle rb = ResourceBundle.getBundle("MyBundle", locale);