Default Localization Template
class DefaultLocalizationTemplate(context: BContext, template: String, locale: Locale) : LocalizationTemplate(source)
Default implementation for LocalizationTemplate.
This is effectively MessageFormat, but with named parameters.
To declare a variable inside your localization template, you may use {variable_name}
.
As this supports MessageFormat, you can also specify format types, such as: {variable_name, number}
, and format styles, such as: {user_amount, choice, 0#users|1#user|1<users}
.
Full example: "There are {user_amount} {user_amount, choice, 0#users|1#user|1<users} and my up-time is {uptime, number} seconds"