GithubHelp home page GithubHelp logo

Comments (7)

bratan avatar bratan commented on August 14, 2024 1

The package doesn't support this functionality so you need to implement yourself.

from flutter-translate.

bratan avatar bratan commented on August 14, 2024

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.

erperejildo avatar erperejildo commented on August 14, 2024

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.

ezamagni-tg avatar ezamagni-tg commented on August 14, 2024

This feature would have been implemented by #45
Sadly, the author rejected it

from flutter-translate.

Skogsfrae avatar Skogsfrae commented on August 14, 2024

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.

erperejildo avatar erperejildo commented on August 14, 2024

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:

Screenshot_1627484325

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.

stale avatar stale commented on August 14, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.