Skip to content

v0.5.1

Compare
Choose a tag to compare
@huacnlee huacnlee released this 10 Dec 03:41
· 183 commits to main since this release
  • Add i18n config support in Cargo.toml, now cargo i18n will use that.
  • cargo i18n has removed --locale, --output flags, instead to use I18n config.

In your Cargo.toml:

You can change the I18n settings.

[package.metadata.i18n]
# The available locales for your application, default: ["en"].
available-locales = ["en", "zh-CN"]

# The default locale, default: "en".
default-locale = "en"

# Path for your translations YAML file, default: "locales".
load-path = "locales"

After that, cargo i18n will use these settings for check and generate.