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

There are no translations in 'en_us' for "Aug" #142

Open
edwin-alvarez opened this issue Aug 20, 2024 · 0 comments
Open

There are no translations in 'en_us' for "Aug" #142

edwin-alvarez opened this issue Aug 20, 2024 · 0 comments

Comments

@edwin-alvarez
Copy link

    var f = DateFormat("MMM");
    String formattedDate = f.format(d);
    return formattedDate.i18n; <-- this not able to find the translation

looks like above line is not translating because my Locale("en") is not found it is trying to find en_us

I don't have access to context yet when trying to translate, because that's being call at main() thus instead of calling
I18n.of(context).locale = const Locale("en");

I was trying to call
I18n.define(const Locale("en"));
but that marked for testing
///This should be used in tests ONLY. The real app, you should
/// instead do: `I18n.of(context).locale = Locale("en", "US");

this works, but I'm worry I'm doing something not correct, or that method gets deprecate/remove

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

1 participant