Module perseus::translations_manager [−][src]
Expand description
Utilities for creating custom translations managers, as well as the default FsTranslationsManager
.
Structs
A dummy translations manager for use if you don’t want i18n. This avoids errors of not being able to find translations. If you set
no_i18n: true
in the locales
section of define_app!
, this will be used by default. If you intend to use i18n, do not use this!
Using the link!
macro with this will NOT prepend the path prefix, and it will result in a nonsensical URL that won’t work.
The default translations manager. This will store static files in the specified location on disk. This should be suitable for nearly all development and serverful use-cases. Serverless is another matter though (more development needs to be done). This mandates that translations be stored as files named as the locale they describe (e.g. ‘en-US.ftl’, ‘en-US.json’, etc.).
Enums
Errors that can occur in a translations manager.
Traits
A trait for systems that manage where to put translations. At simplest, we’ll just write them to static files, but they might also
be stored in a CMS. It is strongly advised that any implementations use some form of caching, guided by FsTranslationsManager
.