Author: Nicola De Nicolais
Android application built with Kotlin and Jetpack Compose that allows you to select the language of the displayed text.
Clone this repository :
git clone https://github.com/ndenicolais/LanguageSelector.git
Import the project into Android Studio :
- File -> New -> Import Project
- Browse to <path_to_project>
- Click "OK"
Create a new virtual device or connect an Android device to your computer.
Click Run to start the project on the selected device.
Kotlin
Jetpack Compose
ViewModel
LiveData
Preferences Datastore
Dagger Hilt
com.denicks21.languageselector # ROOT PACKAGE
β
βββ repository # REPOSITORY FOLDER
| β βββ DataStoreRepository # DataStore repository.
β
βββ ui.theme # THEME FOLDER
| β βββ Color # Color palette used by the app.
| β βββ Shape # Components shapes of Compose used by the app.
| β βββ Theme # Theme used by the app.
| β βββ Type # Typography styles for the fonts used by the app.
β
βββ viewmodels # VIEWMODELS FOLDER
| β βββLanguageViewModel # Model that interact with repository class.
|
βββ MainActivity # Main activity
In the app, you can add or modify languages, you simply need to modify the strings files present in the "strings" folder. These resources are defined within XML files in the "res/values/" folder with the .xml extension.
To support other languages, you can create copies of the strings.xml file within new "res/values-xx/" folders where "xx" represents the language code.