Single app.yml file doesn't work.
Closed this issue · 2 comments
eminfedar commented
I have a single app.yml file in locales folder like this:
Settings:
en: Settings
tr: Ayarlar
Country:
en: Country
tr: Ülke
City:
en: City
tr: Şehir
I initialized with i18n!()
and I set the labels of the program like t!("Settings")
.
But the strings I got on the labels like:
en.Settings
en.Country
en.City
Which is not I expected:
Settings
Country
City
Also tried running the app with LANG=tr_TR.UTF-8 myapp
and I still see en.Settings
not tr.Settings
or translated Ayarlar
.
Also:
The output of the println!("{:?}", rust_i18n::available_locales!());
is ["app"]
It seems single file is not supported yet in version = "2"
huacnlee commented
Add _version: 2
in this file.
_version: 2
Settings:
en: Settings
tr: Ayarlar
eminfedar commented
Yeah that solved, Thanks!