Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The NautDrafter project has the ability to use many different languages.

The files can be found in nautdrafter.bundles in the format Strings_[ISO 639 alpha-2 or alpha-3 language code]_[ISO 3166 alpha-2 country code].properties. For example; Strings_en_GB.properties.

Current Files

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

Adding New Languages

To add a new language you must;

  • 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 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;

After all of these modifications the language should load much like the currently installed languages.

  • No labels