https://github.com/nfdz/excel_for_flutter_localizations
A Dart package that allows you to use a Excel as a localization platform alongside the standard Flutter library.
https://github.com/nfdz/excel_for_flutter_localizations
dart excel flutter intl localization-tool localizations
Last synced: 7 months ago
JSON representation
A Dart package that allows you to use a Excel as a localization platform alongside the standard Flutter library.
- Host: GitHub
- URL: https://github.com/nfdz/excel_for_flutter_localizations
- Owner: nfdz
- License: mit
- Created: 2025-03-07T17:59:27.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-03-09T16:27:12.000Z (7 months ago)
- Last Synced: 2025-03-09T16:33:06.119Z (7 months ago)
- Topics: dart, excel, flutter, intl, localization-tool, localizations
- Language: Dart
- Homepage: https://pub.dev/packages/excel_for_flutter_localizations
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
Excel for flutter_localizations---
## Overview
A Dart package that allows you to use a Excel as a localization platform alongside the standard Flutter library [flutter_localizations](https://docs.flutter.dev/ui/accessibility-and-internationalization/internationalization).
The idea is to **keep it simple** until you perhaps need to use a more professional platform. In that case, the change will be immediate, without code migrations or problems.
### Breakdown of the Rules
- The source of truth is the ARB file declared as template (`template-arb-file`) → *This file will never be modified by this tool*
- When a translation entry is in the Excel and in the ARB file of its language → *The one in Excel will be used*
- When a translation entry is not present in the ARB template file → *It will be deleted from Excel and all other ARBs*
- When a translation entry is not present in Excel but is present in the translated ARBs → *The present translations will be used for the ARBs and for the Excel*
- When a translation entry has changed its text in the reference language (`template-arb-file`) → *This translation will be updated in the Excel*
- Be careful because the rest of the languages will continue to use the value they have in Excel. To update the translations, the idea is to go through the Excel.#### New and Fuzzy Translations
The first column of the Excel will have an `X` when:
- The translation entry is new.
- The translation entry has changed in the reference language (`template-arb-file`).#### Disabled Columns
There is a greyish background colour in the cells that should not be modified under any circumstances in the Excel file. The reason is that they will not produce any change in the ARBs and may be misleading. They are: `context`, `key`, `reference translation`.
## Install
```bash
dart pub global activate excel_for_flutter_localizations
```## Usage
```bash
dart pub global run excel_for_flutter_localizations [ARGS]
```#### Arguments
| Mandatory | Argument | Description |
|-----------|------------------------------|----------------------------------------------------------------------------------------|
| Yes | -a, --arb-dir | Path to the ARB files directory, eg: lib/l10n |
| Yes | -e, --excel-file | Path to the Excel file, eg: translations.xlsx |
| Yes | -t, --template-arb-file | ARB template file, eg: app_en.arb |
| No | -v, --verbose | Print verbose output |#### Most Common Scenario
Using the same naming conventions as Flutter documentation.
```bash
dart pub global run excel_for_flutter_localizations -a lib/l10n -e translations.xlsx -t app_en.arb
```