Comments (7)
The package doesn't support this functionality so you need to implement yourself.
from flutter-translate.
You can to create a list of localization keys (for descriptions) instead and then for each item you can get the value using the translate method.
from flutter-translate.
you mean something like this?
["translation.text", "translation.another_text"]
Because if I do that I will need to modify the widget every time I change the translations json. That list should pick as many translations as I have automatically
from flutter-translate.
This feature would have been implemented by #45
Sadly, the author rejected it
from flutter-translate.
The package doesn't support this functionality so you need to implement yourself.
@bratan I once implemented it myself and proposed it as an improvement (very useful for other people too as I can see) with PR #45 that was rejected :)
I was told that to include a new translation I had to make a new build anyway, which is true, but edit the codebase (which in some flows requires a PR) is way different than just pressing a button to make a new build with an automation environment that downloads the updated translated strings (Ex.: Bitrise.io).
from flutter-translate.
I opened it since more people requested the same thing.
@bratan let me explain a real example here:
I have a screen with information about changes from latest version. It looks like this:
This bullet points or sections are dynamic, based on what info I need to display. Right now, if I want to update this I need to modify the translations files and with this, the length of my list. We could eliminate the second change if we can pick automatically the length of the translations.
When you say "This problem can easily be solved by creating an array of localization keys instead", it's true, but with that PR we can easily forget about that.
And I have the same situation in many places, so it's not "very situational".
from flutter-translate.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from flutter-translate.
Related Issues (20)
- Update packages HOT 4
- Parent Widget not updated HOT 2
- Add information for the deprecated flutter_translate_gen HOT 4
- No MaterialLocalizations found , If change language to Soomaali (so) HOT 2
- reverse back when change language HOT 1
- Language changes, then falls back to default language
- Possible to translate a specific widget? HOT 1
- Simplify configuration & initialization
- Implement a missing key strategy HOT 1
- Implement remote (http) localization loader HOT 1
- universal_io, Question about? HOT 1
- Why flutter_translate_gen has been archived? HOT 1
- Wiki updates HOT 4
- Upgrade the package to use the latest version of "intl" HOT 8
- Wrap LocalizationProvider for Cubit / BLoC package HOT 1
- Pluralization feature not working for static keys HOT 5
- Localization Issue with OS language changes HOT 1
- Test for web platform is not working HOT 1
- Not fiend flutter_localizations GlobalMaterialLocalizations error HOT 1
- en.json missing from assets HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter-translate.