t
Returns the string of a translated text from a translation file based on a specified key.
key | t(placeholder=value, ...) returns a string.
Required params
key string: A key in the translation file.
Optional params
placeholder any: The name of the dynamic placeholder in the string of the translated text. value represents the actual data to be interpolated into the dynamic placeholder. You can pass multiple custom parameters using the placeholder=value format.
Example
{{ "products.general.sold_out" | t() }}
{{ "products.product_details.inventory_low_stock_show_count" | t(quantity=10) }}
Was this article helpful to you?