{"repo":"B3nedikt/AppLocale","free":true,"listed":false,"github":"https://github.com/B3nedikt/AppLocale","clone":"git clone https://github.com/B3nedikt/AppLocale.git","description":"AppLocale is a android library to update the app language dynamically.","language":"Kotlin","stars":144,"topics":["kotlin","android-library"],"license":"Apache-2.0","category":"mobile-apps","readme_excerpt":"App Locale 3.1.0 AppLocale is a android library to change the app language dynamically. 1. Add dependencies In addition to appcompat from androidX which you most likely already use, the following three dependencies are needed: 2. Initialize Initialize ViewPump & Reword in your Application class: 3. Inject into Context If you use your application Context to retrieve string resources add the following to your Application class: If you have a BaseActivity you can add this there, otherwise you have to add it to all of your activities: 3. Update the app language Now we can just set the desiredLocale to the Locale we want our app to use: When the activity gets restarted, all texts will be localized using the new Locale. Alternativeley you can reload the UI like this: If you use this approach and you changed the texts of views in code, you need to update these texts manually of course. App Bundle support If you use the new android app bundle (aab) format to distribute your app, android will strip out all languages which are not the users devices default language. To disable this add this to your build.gradle: Alternatively load the languages dynamically using the playcore library as described in its Documentation. License","default_branch":null,"files":null,"tree":[],"storefront":"/r/B3nedikt","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/B3nedikt/AppLocale/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}