diff --git a/app/src/main/java/info/nightscout/androidaps/MainActivity.java b/app/src/main/java/info/nightscout/androidaps/MainActivity.java index 6c3d6f9820..1595e6cb02 100644 --- a/app/src/main/java/info/nightscout/androidaps/MainActivity.java +++ b/app/src/main/java/info/nightscout/androidaps/MainActivity.java @@ -182,7 +182,7 @@ public class MainActivity extends AppCompatActivity { @Subscribe public void onStatusEvent(final EventRefreshGui ev) { - String lang = SP.getString("language", "en"); + String lang = SP.getString(R.string.key_language, "en"); LocaleHelper.setLocale(getApplicationContext(), lang); runOnUiThread(() -> { if (ev.recreate) { diff --git a/app/src/main/java/info/nightscout/utils/FabricPrivacy.java b/app/src/main/java/info/nightscout/utils/FabricPrivacy.java index 7f050e609a..4d62e063ca 100644 --- a/app/src/main/java/info/nightscout/utils/FabricPrivacy.java +++ b/app/src/main/java/info/nightscout/utils/FabricPrivacy.java @@ -110,6 +110,7 @@ public class FabricPrivacy { CustomEvent pluginStats = new CustomEvent("PluginStats"); pluginStats.putCustomAttribute("version", BuildConfig.VERSION); pluginStats.putCustomAttribute("HEAD", BuildConfig.HEAD); + pluginStats.putCustomAttribute("language", SP.getString(R.string.key_language,"default")); for (PluginBase plugin : MainApp.getPluginsList()) { if (!plugin.pluginDescription.alwaysEnabled) { if (plugin.isEnabled(plugin.getType())) diff --git a/app/src/main/res/xml/pref_language.xml b/app/src/main/res/xml/pref_language.xml index 69ca28a8df..981de2b346 100644 --- a/app/src/main/res/xml/pref_language.xml +++ b/app/src/main/res/xml/pref_language.xml @@ -1,7 +1,6 @@ + android:key="@string/key_language" /> \ No newline at end of file