Skip to content

Commit

Permalink
Set Java default locale
Browse files Browse the repository at this point in the history
  • Loading branch information
epinter committed Jun 29, 2024
1 parent 91e988c commit bf94812
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/br/com/pinter/tqrespec/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,10 @@ public void prepareMainStage(Stage primaryStage) {
Locale gameLanguage = gameInfo.getGameLanguage();
if (gameLanguage != null) {
State.get().setLocale(gameLanguage);
logger.log(System.Logger.Level.INFO, "Application language set to ''{0}''", State.get().getLocale());
}
Locale.setDefault(State.get().getLocale());
logger.log(System.Logger.Level.INFO, "Application language set to ''{0}''", State.get().getLocale());

fxmlLoader.setResources(ResourceBundle.getBundle("i18n.UI", State.get().getLocale()));
fxmlLoader.setLocation(ResourceHelper.getResourceUrl(Constants.UI.MAIN_FXML));
root = fxmlLoader.load();
Expand Down

0 comments on commit bf94812

Please sign in to comment.