ibrahimsn98 / SmoothBottomBar

A lightweight Android material bottom navigation bar library
MIT License
1.98k stars 255 forks source link

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

Open dnogard opened 8 months ago

dnogard commented 8 months ago

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"?>