From 3d8639d62a2c28750654b767fd940cd223c62e32 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Sat, 3 Sep 2022 02:25:11 +0600 Subject: Localization!!! --- core/src/com/ilotterytea/maxoning/MaxonGame.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'core/src/com/ilotterytea/maxoning/MaxonGame.java') diff --git a/core/src/com/ilotterytea/maxoning/MaxonGame.java b/core/src/com/ilotterytea/maxoning/MaxonGame.java index a410a12..e0a4415 100644 --- a/core/src/com/ilotterytea/maxoning/MaxonGame.java +++ b/core/src/com/ilotterytea/maxoning/MaxonGame.java @@ -7,6 +7,7 @@ import com.badlogic.gdx.assets.AssetManager; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.ilotterytea.maxoning.player.MaxonPlayer; import com.ilotterytea.maxoning.screens.AssetLoadingScreen; +import com.ilotterytea.maxoning.utils.I18N; import com.ilotterytea.maxoning.utils.serialization.GameDataSystem; import java.io.IOException; @@ -15,6 +16,7 @@ public class MaxonGame extends Game { public SpriteBatch batch; public AssetManager assetManager; public Preferences prefs; + public I18N locale; private static MaxonGame instance; @@ -29,6 +31,7 @@ public class MaxonGame extends Game { public void create () { batch = new SpriteBatch(); prefs = Gdx.app.getPreferences("Maxoning"); + locale = new I18N(prefs.getString("lang", "en_us")); if (!GameDataSystem.exists()) { try { -- cgit v1.2.3