get_format
For a specific format type, return the format for the current language (locale). Default to the format in the settings. format_type is the name of the format, e.g. 'DATE_FORMAT'. If use_l10n is provided and is not None, it forces the value to be localized (or not), otherwise it's always localized.
def get_format(
format_type: string,
lang: string = None,
use_l10n: boolean = None
) - > string|list
For a specific format type, return the format for the current language (locale). Default to the format in the settings.
Parameters
| Name | Type | Description |
|---|---|---|
| format_type | string | The name of the format to retrieve, such as 'DATE_FORMAT' or 'DATETIME_FORMAT'. |
| lang | string = None | The language code used to look up the localized format; defaults to the current active language if not provided. |
| use_l10n | boolean = None | A flag to force localization on or off; if None, localization is enabled by default. |
Returns
| Type | Description |
|---|---|
| `string | list` |