Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use language packs differs from device settings. #121

Open
dnogard opened this issue Mar 30, 2024 · 0 comments
Open

How to use language packs differs from device settings. #121

dnogard opened this issue Mar 30, 2024 · 0 comments

Comments

@dnogard
Copy link

dnogard commented Mar 30, 2024

As far as I can see, the titles will load the language pack (eg en, fr,...) based on the device's system settings. For example, if the device's display language is English, the titles will be taken from the strings (en) file, even if I have set the app to load the language from a certain other language pack. Although I tried reloading via the following method, nothing changed.
//======= main_activity
override fun onCreateOptionsMenu(menu: Menu?): Boolean {
loadTheSaved()
setLocaleAtStart()
menuInflater.inflate(R.menu.menu_bottom, menu)
val menuItem1 = menu?.findItem(R.id.feature_1)
val menuItem2 = menu?.findItem(R.id.feature_2)
menuItem1?.title = resources.getString(R.string.feature_1)
menuItem2?.title = resources.getString(R.string.feature_2)
return super.onCreateOptionsMenu(menu)
}
//======= menu_bottom.xml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant