Skip to content

Not available yet

Internationalization ​

Corvis does not have an internationalization module: there is no translation catalog loading, per-request language resolution or injectable translation service.

Alternative ​

  • The error messages of corvis::z can be shown in Spanish with the included locale: z::configure(|c| c.locale_error = Some(z::locales::es())). It is a process-wide setting (see Validation).
  • To read the client's preferred language, take the Accept-Language header with #[headers("accept-language")] lang: Option<String> in the handler, or create your own parameter with FromContext (see Custom decorators).
  • For your application's texts, load your catalogs in a provider of your own (for example with Provider::use_value) or use a Rust i18n crate.

Released under the MIT License.