slang-i18n / slang

Type-safe i18n for Dart and Flutter
https://pub.dev/packages/slang
MIT License
474 stars 39 forks source link

Access to the inactive language #148

Closed gmaggio closed 1 year ago

gmaggio commented 1 year ago

Motivation I have a sentence where if in the original (default) language, the sentence shows as is. But in the other language, in addition to having it translated, it also shows the sentence in the original language as a caption. Now what I need is access to the original language while I'm in the other language.

Developer Experience There should be a way to access the other language other than the one in context. Eg. var t2 = Translation.locale('de')

gmaggio commented 1 year ago

My bad. I missed the docs about dependency injection 🙏🏻