i18n
RTL/LTR
{$t} helper
Test Language (i18n)
Translate any string with {$t('key')}, support parameters, dynamic keys, and switch the active language on the fly.
English
en
Languages
24
Active
en
Choose a language
Click any flag to switch the active locale
Translation examples
Same template, six different ways to call $t()
Plain string
Example TString
Nested path
Example Path
Path string
Example Path String
Params (raw)
My name is {name}, my age is {age}
Params (with values) name=Jack, age=20
Hello, my name is Jack and I am 20 years old.
Dynamic key
A = 4, B = 7, C = 6, D = 5
File References
Where i18n is wired up
-
View
example/lib/widgets/example/i18n.j2.html -
Controller
example/lib/controllers/home_controller.dart -
Languages directory
example/lib/languages