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
<?xml version="1.0" encoding="utf-8"?>
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 <?xml version="1.0" encoding="utf-8"?>