An android gradle plugin for automating localization. It will automatically generate all strings.xml files for your desired languages.
Include the plugin in app level gradle
plugins {
...
...
// for kotlin
id("io.github.farimarwat.lokalenow") version "1.3"
//for groovy
id "io.github.farimarwat.lokalenow" version "1.3"
}
Also make sure that gradlePluginPortal() in included in settings.gradle.kts
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
Outside of the android{} block use this:
android{
...
...
}
// for kotlin
lokalenow{
listLang = listOf("fr","ru","ar")
}
// for groovy
lokalenow{
listLang = ["fr","ru","ar"]
}
When you will build, It will automatically generate strings.xml file according to requested languages.
Use "translatable=false" for excluding any translation
<string name="details" translatable="false">This will not be translated</string>
This gradle plugin is developed based upon google translate api. It may some time not work due to frequent requests.
Kindly perform these steps:
- Build>Clean Project
- Build>Rebuild Project
There is need to handle symbols while translation. If you want to improve the conversion process then feel free to contribute.
1.3 Modified by RufenKhokhar
1.2 Minor bugs fixed
1.1 strings.xml path issue fixed for mac
1.0 Initial commit
If you want to support me then buy me a cup of tea: Buy