Skip to content
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

[FR]: Add Localized Asset Generation #436

Closed
2 tasks done
ricardodalarme opened this issue Oct 18, 2023 · 2 comments
Closed
2 tasks done

[FR]: Add Localized Asset Generation #436

ricardodalarme opened this issue Oct 18, 2023 · 2 comments

Comments

@ricardodalarme
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the problem

Currently, FlutterGen is a fantastic tool for generating code related to assets, fonts, colors, and APIs in Flutter applications. However, it lacks the capability to generate localized assets easily.

In many internationalized applications, it's essential to provide localized versions of assets like images, with different languages or regions using the same asset but tailored to their needs. For instance, a logo used in English-speaking regions may be different from the one used in Portuguese-speaking regions.

This feature request aims to address this limitation by adding the ability to generate localized assets using FlutterGen.

Describe the solution

The solution involves enhancing FlutterGen to recognize and generate assets from localized directories. Specifically, it should:

  1. Recognize language or region-specific directories within the assets directory, such as /assets/en for English and /assets/pt for Portuguese.

  2. Allow users to provide assets in these localized directories. For example:

    • /assets/en/logo.png for the English version of the logo.
    • /assets/pt/logo.png for the Portuguese version of the logo.
  3. Generate code that makes it easy to access these localized assets in Flutter, ensuring that the correct asset is used based on the application's current locale.

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@ricardodalarme ricardodalarme added the enhancement New feature or request label Oct 18, 2023
@ricardodalarme ricardodalarme changed the title [FR]: Add Localized Asset Generation' [FR]: Add Localized Asset Generation Oct 20, 2023
@AlexV525
Copy link
Member

Should be a duplicate of #281

@AlexV525 AlexV525 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 10, 2024
@alexkater
Copy link

@AlexV525 there is any reason to close as not planned?

Thanks in advance, amazing work!

@AlexV525 AlexV525 removed the enhancement New feature or request label Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants