Internationalization
Per-request internationalization is enabled by default for the following languages:
- English (en)
- Estonian (et)
- Lithuanian (lt)
Client requests will respect the Accept-Language header.
Translation String Guidelines
When marking strings for translation, follow these guidelines:
- Build a proper sentence: start with a capital letter, end with a period.
Right: _('Deletion was scheduled.')
Wrong: _('deletion was scheduled')
- Use named-string interpolation instead of positional interpolation if message has several parameters.
Right: _('Operation was successfully scheduled for %(count)d instances: %(names)s.')
Wrong: _('Operation was successfully scheduled for %s instances: %s.')
- Mark the following for translation:
help_text,verbose_name, exception messages, and response messages. - Do NOT mark message templates for event or alert loggers.
Adding New Languages
For translating fields of some models, Waldur uses django-modeltranslation.
See the How to Add New Language guide for details on adding support for additional languages.