Skip to content

reuniware/Kotlin-LocaleManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

Kotlin-LocaleManager

LocaleManager converted from Java to Kotlin

In order to use LocaleManager, don't forget to declare the 2 necessary overrided methods in App.kt file (that is also in this repository) or any other class that extends Application().

Original project : https://gist.github.com/Jasonlhy/f6d1211c4f848a3f685bd2d28c6e2eb5

This class will help you to define arbitrarily the locale used by an Activity in your application.

For example, you have to call LocaleManager.setNewLocale(this@YourActivityName, "en") in each activity of your application in the onCreate method before the setContentView call.

To get the locale, use val currentLocale = ConfigurationCompat.getLocales(resources.configuration)[0]

https://ntic974.blogspot.com

About

LocaleManager converted from Java to Kotlin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages