Internationalization
Per-request internationalization is enabled by default for English and Estonian languages.
Client requests will respect the Accept-Language
.
Here are the guidelines for specifying translation strings:
- 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.')
- help_text, verbose_name, exception message and response message should be marked, but don't mark message template for event or alert logger.