android locale tuning

This commit is contained in:
Finnley Somdahl 2023-11-21 04:08:45 -06:00
parent 8d9254140d
commit 594fa4daa9
3 changed files with 6 additions and 6 deletions

View file

@ -12,8 +12,7 @@ class LangSet {
companion object{
fun setLocale(activity: Activity) {
val useCursedLang = activity.getSharedPreferences("Dantotsu", Activity.MODE_PRIVATE).getBoolean("use_cursed_lang", false)
if(!useCursedLang) return
val locale = Locale("en", "rDW")
val locale = if(useCursedLang) Locale("en", "DW") else Locale("en", "US")
Locale.setDefault(locale)
val resources: Resources = activity.resources
val config: Configuration = resources.configuration

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<resources>
<resources xmlns:tools="http://schemas.android.com/tools"
tools:locale="en-rDW">
<string name="repo">webewonyion/Dantotsu</string>
<string name="preference_file_key" translatable="false">d-d-d-dantotsupwefs</string>

View file

@ -1,4 +1,5 @@
<resources>
<resources xmlns:tools="http://schemas.android.com/tools"
tools:locale="en-rUS">
<string name="repo">rebelonion/Dantotsu</string>
<string name="preference_file_key" translatable="false">dantotsuprefs</string>