i18n
RTL/LTR
{$t} helper
测试语言 (i18n)
Translate any string with {$t('key')}, support parameters, dynamic keys, and switch the active language on the fly.
Chinese
zh
Languages
24
Active
zh
Choose a language
Click any flag to switch the active locale
Translation examples
Same template, six different ways to call $t()
Plain string
TString 示例
Nested path
路径示例
Path string
路径字符串示例
Params (raw)
我的名字是 {name},我的年龄是 {age}
Params (with values) name=Jack, age=20
你好,我的名字是 Jack,我 20 岁了。
Dynamic key
A = 0, B = 8, C = 9, D = 6
File References
Where i18n is wired up
-
视图
example/lib/widgets/example/i18n.j2.html -
控制器
example/lib/controllers/home_controller.dart -
语言目录
example/lib/languages