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

Parameterize L10n types #273

Open
akshdeep-singh opened this issue Dec 19, 2024 · 1 comment
Open

Parameterize L10n types #273

akshdeep-singh opened this issue Dec 19, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@akshdeep-singh
Copy link

I want to pass variable inside variable as follows:

"currency": "${value: simpleCurrency(name: 'USD')}"

I want to pass the name as a parameter, how can I do?

@Tienisto
Copy link
Member

Hello, this is currently not possible.
You need to handle L10n outside of slang:

final name = 'USD';
final currencyString = NumberFormat.simpleCurrency(name: name);
t.myKey(currencyString);

@Tienisto Tienisto added the enhancement New feature or request label Dec 19, 2024
@Tienisto Tienisto changed the title How to use variable inside variable? Parameterize L10n types Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants