Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The current files include a default (en_GB) and a similar (en_US). There are also two more files (zh & es) that are for Chinese and Spanish respectively. Both are machine-translated using Google Translate and are only meant as placeholders.

...

  • Create a new language file in the above format using all the strings that differ for the default (Strings.properties) and save these in the correct directory.
  • Add It will automatically be added it into the FXML drop-down list in the file nautdrafter.view.Login.fxml in the format <String fx:value="[Language]">.
  • Add an case-statement to the language.setOnAction block in the initialize method in the file nautdrafter.controller.LoginController.java in the format:
    • case "[Language]":
    • NautDrafter.setCountryCode("[ISO 639 alpha-2 or alpha-3 language code]-[ISO 3166 alpha-2 country code]");
    • break;

...

  • and be able to be selected.

It should be noted that if a particular string is missing from the bundle, then it will fall back to the default Strings.properties which is in English (UK). As an example for en_US only those strings that are spelt different are needed to be defined and the fell can be allowed to fall back.