Builtin
liquid2.builtin.register_default_tags_and_filters
Register standard tags and filters with an environment.
liquid2.builtin.BaseTranslateFilter
Base class for the default translation filters.
PARAMETER | DESCRIPTION |
---|---|
translations_var
|
The name of a render context variable that resolves to a
gettext
TYPE:
|
default_translations
|
A fallback translations class to use if
TYPE:
|
message_interpolation
|
If
TYPE:
|
auto_escape_message
|
If
TYPE:
|
liquid2.builtin.Currency
A Liquid filter for formatting currency values.
PARAMETER | DESCRIPTION |
---|---|
currency_code_var
|
The name of a render context variable that resolves
to the current currency code. Defaults to
TYPE:
|
default_currency_code
|
A fallback currency code if
TYPE:
|
locale_var
|
The name of a render context variable that resolves to the
current locale. Defaults to
TYPE:
|
default_locale
|
A fallback locale to use if
DEFAULT:
|
format_var
|
The name of a render context variable that resolves to the
current currency format string. Defaults to
TYPE:
|
default_format
|
A fallback currency format that is used if
TYPE:
|
currency_digits
|
Indicates if the format should override locale specific
trailing digit behavior. Defaults to
TYPE:
|
input_locale_var
|
The name of a render context variable that resolves to
a locale suitable for parsing input strings to decimals. Defaults to
TYPE:
|
default_input_locale
|
A fallback locale to use if
TYPE:
|
liquid2.builtin.DateTime
A Liquid filter for formatting datetime objects.
PARAMETER | DESCRIPTION |
---|---|
timezone_var
|
The name of a render context variable that resolves to
a timezone. Defaults to
TYPE:
|
default_timezone
|
A fallback timezone to use if
TYPE:
|
locale_var
|
The name of a render context variable that resolves to the
current locale. Defaults to
TYPE:
|
default_locale
|
A fallback locale to use if
TYPE:
|
format_var
|
The name of a render context variable that resolves to the
current datetime format string. Defaults to
TYPE:
|
default_format
|
A fallback datetime format that is used if
TYPE:
|
input_timezone_var
|
The name of a render context variable that resolves to
a timezone for parsing datetimes entered as strings. Defaults to
TYPE:
|
default_input_timezone
|
A fallback timezone to use if
TYPE:
|
liquid2.builtin.GetText
liquid2.builtin.JSON
Serialize an object to a JSON formatted string.
PARAMETER | DESCRIPTION |
---|---|
default
|
A function passed to
TYPE:
|
liquid2.builtin.NGetText
Bases: BaseTranslateFilter
, TranslatableFilter
A Liquid filter equivalent of gettext.ngettext
.
liquid2.builtin.NPGetText
liquid2.builtin.Number
A Liquid filter for formatting decimal values.
PARAMETER | DESCRIPTION |
---|---|
decimal_quantization_var
|
The name of a render context variable that
resolves to the decimal quantization to be used. Defaults to
TYPE:
|
default_decimal_quantization
|
A fallback decimal quantization if
TYPE:
|
locale_var
|
The name of a render context variable that resolves to the
current locale. Defaults to
TYPE:
|
default_locale
|
A fallback locale to use if
TYPE:
|
format_var
|
The name of a render context variable that resolves to the
current decimal format string. Defaults to
TYPE:
|
default_format
|
A fallback decimal format that is used if
TYPE:
|
input_locale_var
|
The name of a render context variable that resolves to
a locale suitable for parsing input strings to decimals. Defaults to
TYPE:
|
default_input_locale
|
A fallback locale to use if
TYPE:
|
liquid2.builtin.PGetText
liquid2.builtin.Translate
Bases: BaseTranslateFilter
, TranslatableFilter
A Liquid filter for translating strings to other languages.
Depending on the keyword arguments provided when the resulting filter is called, it could behave like gettext, ngettext, pgettext or npgettext.
liquid2.builtin.TranslateTag
Bases: Tag
The built-in "translate" tag.
liquid2.builtin.Unit
A Liquid filter for formatting units of measurement.
PARAMETER | DESCRIPTION |
---|---|
locale_var
|
The name of a render context variable that resolves to the
current locale. Defaults to
TYPE:
|
default_locale
|
A fallback locale to use if
TYPE:
|
length_var
|
The name of a render context variable that resolves to a
unit format length. Should be one of "short", "long" or "narrow".
Defaults to
TYPE:
|
default_length
|
A fallback format length to use if
TYPE:
|
format_var
|
The name of a render context variable that resolves to a
decimal format string. Defaults to
TYPE:
|
default_format
|
A fallback decimal format to use if
TYPE:
|
input_locale_var
|
The name of a render context variable that resolves to
a locale suitable for parsing input strings to decimals. Defaults to
TYPE:
|
default_input_locale
|
A fallback locale to use if
TYPE:
|