New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can we change _allValues? #27
Comments
@chang-ran This is planned for version 2.0. In the meantime, there is a proof of concept on this branch. The following option flappy_translator:
exposeLocalizedValues: true will generate static Map<String, String> get localizedValues => _localizedValues; You can add git dependencies to pubspec as follows: flappy_translator:
git:
url: https://github.com/defuncart/flappy_translator
ref: feature/localized-values-option |
I mean exposing the whole map, which inlcludes all locales , not a certain map |
For example, I want to get strings in Chinese when I am using English as default language. |
@chang-ran Sorry, now I understand the feature request :) This sounds like a good idea, if I get some time over the weekend, I'll try and whip up a solution. |
ok thx |
Adds the options for expose_loca_strings and expose_locale_maps. Resolves #27. Commits: * Add templateLocalizedValues. * Add exposeLocalizedValues. * Update example. * Update README. * Rename exposeLocalizedValues to exposeLocaStrings. * Add exposeLocaleMaps. * Update exposeLocaStrings, exposeLocaleMaps to depend on context. * Tidy up templateGetString. * Update README.md * Update example. * Ensure locaStrings and localeMaps are copies of original data.
change: static Map<String, Map<String, String>> _allValues ---> static final Map<String, Map<String, String>> allValues
so that we can get strings in any locale from allValues.
The text was updated successfully, but these errors were encountered: