https://github.com/prongbang/localizegen
Generate Localization tools for Mobile Application an Android, iOS, Flutter
https://github.com/prongbang/localizegen
android-localization ios-localization localization localization-tool mobile-localization mobile-localization-tools sheet-localization
Last synced: about 2 months ago
JSON representation
Generate Localization tools for Mobile Application an Android, iOS, Flutter
- Host: GitHub
- URL: https://github.com/prongbang/localizegen
- Owner: prongbang
- License: mit
- Created: 2021-09-02T15:36:06.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-08-13T04:56:28.000Z (over 1 year ago)
- Last Synced: 2025-03-07T20:18:48.881Z (about 2 months ago)
- Topics: android-localization, ios-localization, localization, localization-tool, mobile-localization, mobile-localization-tools, sheet-localization
- Language: Go
- Homepage:
- Size: 46.5 MB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# localizegen
```shell
__ ___
/ /__ _______ _/ (_)__ ___ ___ ____ ___
/ / _ \/ __/ _ `/ / /_ // -_) _ `/ -_) _ \
/_/\___/\__/\_,_/_/_//__/\__/\_, /\__/_//_/
/___/
--> START
# Platform: ios
# Language: en
# Generate: localization
> Create ./App/Locallization/Translate.swift -> Success
> Create ./App/Locallization/en.lproj/Localizable.strings -> Success
<-- DONE
```Generate Localization tools for Mobile Application an Android, iOS
[](https://www.buymeacoffee.com/prongbang)
## Setup
- 1. Create a Google Sheet

- 2. Extract from the link the `DocumentId` and `SheetId` values
```shell script
https://docs.google.com/spreadsheets/d//edit#gid=
```Example
```shell script
https://docs.google.com/spreadsheets/d/1r91ECV-As0XtuqGKXU7dXnoY4og9XPBoCqwRcdio6EU/edit#gid=0
```- `DocumentId` = `1r91ECV-As0XtuqGKXU7dXnoY4og9XPBoCqwRcdio6EU`
- `SheetId` = `0`## Download
### Homebrew
```shell
$ brew update
$ brew tap prongbang/homebrew-formulae
$ brew install localizegen
```### Binary
- [macOS](https://github.com/prongbang/localizegen/blob/master/localizegen?raw=true)
- [Linux](https://github.com/prongbang/localizegen/blob/master/binary/linux/localizegen?raw=true)
- [Mindows](https://github.com/prongbang/localizegen/blob/master/binary/windows/localizegen.exe?raw=true)### Golang
```shell
$ go install github.com/prongbang/localizegen
```## Flag
- `-platform` : `android` or `ios` *require
- `-target` : Target path
- `-locale` : `en`, `th`, etc
- `-document` : Google sheet document id *require
- `-sheet` : Google sheet id *require
- `-filename` : Custom file name## Android
- Generate by language
```shell script
$ localizegen -platform android -target ./app/src/main/res -locale en -document 1r91ECV-As0XtuqGKXU7dXnoY4og9XPBoCqwRcdio6EU -sheet 0
```- Generate all language supported
```shell script
$ localizegen -platform android -target ./app/src/main/res -document 1r91ECV-As0XtuqGKXU7dXnoY4og9XPBoCqwRcdio6EU -sheet 0
```Output
```shell
android
├── values
│ └── strings.xml
├── values-de
│ └── strings.xml
├── values-es
│ └── strings.xml
├── values-fr
│ └── strings.xml
├── values-hi
│ └── strings.xml
├── values-ja
│ └── strings.xml
├── values-pt
│ └── strings.xml
├── values-ru
│ └── strings.xml
├── values-th
│ └── strings.xml
└── values-zh
└── strings.xml
```## iOS
- Generate by language
```shell script
$ localizegen -platform ios -target ./ProjectName/Locallization -locale en -document 1r91ECV-As0XtuqGKXU7dXnoY4og9XPBoCqwRcdio6EU -sheet 0
```- Generate all language supported
```shell script
$ localizegen -platform ios -target ./ProjectName/Locallization -document 1r91ECV-As0XtuqGKXU7dXnoY4og9XPBoCqwRcdio6EU -sheet 0
```Output
```shell
ios
├── Localizables.swift
├── de.lproj
│ └── Localizable.strings
├── en.lproj
│ └── Localizable.strings
├── es.lproj
│ └── Localizable.strings
├── fr.lproj
│ └── Localizable.strings
├── hi.lproj
│ └── Localizable.strings
├── ja.lproj
│ └── Localizable.strings
├── pt.lproj
│ └── Localizable.strings
├── ru.lproj
│ └── Localizable.strings
├── th.lproj
│ └── Localizable.strings
└── zh.lproj
└── Localizable.strings
```## Flutter
- Generate by language
```shell script
$ localizegen -platform flutter -target ./ProjectName/Locallization -locale en -document 1r91ECV-As0XtuqGKXU7dXnoY4og9XPBoCqwRcdio6EU -sheet 0
```- Generate all language supported
```shell script
$ localizegen -platform flutter -target ./ProjectName/Locallization -document 1r91ECV-As0XtuqGKXU7dXnoY4og9XPBoCqwRcdio6EU -sheet 0
```Output
```shell
flutter
├── keys_localizations.dart
└── sources_localizations.dart
```