Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

LocoLaser

LocoLaser - Localization tool to import localized strings from external source to your project. Utility support following resource types:

  • Android resources: strings.xml
  • iOS resources: Localizable.strings
  • GetText resources: messages.pom
  • Java Script i18next: strings.json
  • Kotlin Multiplatfor: Generates repository classes for Android, iOS, macOS and JavaSript that can be used in common code.
  • Google Sheets
  • INI File
Migration to 2.0.0

Please read Migration instruction to migrate to version 2.0.0

Related Git's

Gradle plugin: https://github.com/PocketByte/locolaser-gradle-plugin
Android Example: https://github.com/PocketByte/locolaser-android-example
iOS Example: https://github.com/PocketByte/locolaser-ios-example
Kotlin MPP Example: https://github.com/PocketByte/locolaser-kotlin-mpp-example

How does it work

At first you need to create configuration file in JSON format that contains configuration of platforms and sources. Here is the detailed instruction for configuring: LocoLaser Config
Example of Android config that gets strings from Google Sheets:

{
    "platform" : "android",
    "source" : {
        "type" : "googlesheet",
        "column_key" : "key",
        "id" : "1KDu0_iel5qoNTKHZI0e4l3Uy52WisdfswYRy_GlFOPtY"
    },
    "locales" : ["en", "fi"],
    "delay" : 30
}

When configuration is created you should run LocoLaser with corresponding set of jar artifacts which supports platforms and sources from configuration. Example of console command that starts LocoLaser:

java -cp "core.jar:platform-mobile.jar:source-googlesheet.jar" ru.pocketbyte.locolaser.Main "localization_config.json"

These artifacts can be download from maven repository. But there is another simplests ways. If you use gradle you can use LocoLaser gradle plugin instead. Otherwise in LocaLaser iOS Example you can find localize.command, the bash scripts that simplify work with LocoLaser on Unix based systems.

Console arguments

You can override config properties by adding additional console arguments:

  • --force or --f - Sets force_import = true.
  • -cs - String. Override config property conflict_strategy.
  • -delay - Long. Override config property delay.

License

Copyright © 2017 Denis Shurygin. All rights reserved.
Contacts: <mail@pocketbyte.ru>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

Localization tool to import localized strings from external source to your project.

Resources

License

Packages

No packages published
You can’t perform that action at this time.