Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/defint/flutter_i18n_locize
Easy integration locize.io to flutter_i18n.
https://github.com/defint/flutter_i18n_locize
Last synced: 12 days ago
JSON representation
Easy integration locize.io to flutter_i18n.
- Host: GitHub
- URL: https://github.com/defint/flutter_i18n_locize
- Owner: defint
- License: mit
- Created: 2020-08-31T04:34:25.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-11-11T18:11:12.000Z (almost 3 years ago)
- Last Synced: 2024-10-06T21:43:09.247Z (about 1 month ago)
- Language: Dart
- Homepage:
- Size: 33.2 KB
- Stars: 4
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# flutter_i18n_locize
Easy integration locize.io to flutter_i18n. Contains methods to fetch translations and upload new translations.
[![Pub Package](https://img.shields.io/pub/v/flutter_i18n_locize.svg)](https://pub.dev/packages/flutter_i18n_locize)
[![GitHub Actions](https://github.com/defint/flutter_i18n_locize/workflows/Publish%20CI/badge.svg)](https://github.com/defint/flutter_i18n_locize/actions)## Use cases
### Fetching translations
Create config file `.locize.yaml` inside your root project folder and paste the next lines:
```yaml
assetsPath: "./assets/flutter_i18n"
project:
id: "..." # change your project id
namespaces: # change your supported namespaces
- "mobile"
languages: # change your supported languages
- "en"
- "ru"
version: "latest"
#isPrivate: true # in case your project is private you need also API key
#apiKey: "..." # change your API key
```Open your terminal and run next command:
```
flutter pub run flutter_i18n_locize fetch
```Check that translations has been loaded to your assets.
### Uploading new translations
Create config file `.locize.yaml` inside your root project folder and paste the next lines:
```yaml
assetsPath: "./assets/flutter_i18n"
project:
id: "..." # change your project id
apiKey: "..." # change your API key
namespaces: # change your supported namespaces
- "mobile"
languages: # change your supported languages
- "en"
- "ru"
version: "latest"
```Add some translations to your assets.
Open your terminal and run:```
flutter pub run flutter_i18n_locize upload
```Check that translations has been uploaded to locize.io.
## Available commands
| Command | Description |
|---------|-------------|
| `fetch` | Downloads translations from the locize.io to your assets folder. |
| `upload` | Uploads translations to the locize.io from your assets folder. |