Lang Loop

Lang loop.

{loop type="lang" name="the-loop-name" [argument="value"], [...]}

Important informations :

* : argument is required
** : at least one of ** marked argument is required

Global arguments

Argument Description

Determine if loop is use in backend context.

default : false

example : backend_context="on"


force return result for i18n tables even if there is no record

default : false

example : force_return="on"


The maximum number of results to display.

example : limit="10"

name *

The loop name. This name must be unique and is used to reference this loop further in the page (see ifloop, elseloop or pageloop)


The first product to display offset. Will not be used if `page` argument is set.

default : 0

example : offset="1"


The page to display.

example : page="2"

Loop arguments

Argument Description
Thelia >= 2.2

A single or list of lang code.

example : code="fr", code="fr,en"

Thelia >= 2.2

returns only the default language

default : false

example : default_only="true"


A single or list of lang ids.

example : exclude="2", exclude="1,3"


exclude the default language from results

default : false

example : exclude_default="true"


A single or list of lang ids.

example : id="2"

Thelia >= 2.2

A single or list of lang locale.

example : code="fr_FR", code="fr_FR,fr_CA"


A list of values

Expected values :
  • alpha : sort results by lang title ascending alphabetic order
  • alpha_reverse : sort results by lang title descending alphabetic order
  • id : sort results by ascending id order
  • id_reverse : sort result by descending id order
  • position : sort result by ascending position order
  • position_reverse : sort result by descending position order

default : position

example : order="alpha_reverse"

Global outputs

Variable Description
$LOOP_COUNT the current results index, starting from 1
$LOOP_TOTAL the total number of results returned by the loop
$CREATE_DATE The creation date of this Lang
$UPDATE_DATE The last modification date of this Lang

Loop outputs

Variable Description
$CODE lang code, example : fr
$DATE_FORMAT the lang date format
$DECIMAL_COUNT >= 2.2 the number of digits after the decimal separator
$DECIMAL_SEPARATOR >= 2.2 the lang decimal separator, such as , or .
$ID the order id
$IS_DEFAULT check if the current result is the default one
$LOCALE lang locale, example : fr_FR
$POSITION lang position
$THOUSANDS_SEPARATOR >= 2.2 the lang thousangs separator
$TIME_FORMAT the lang time format
$TITLE lang title
$URL the lang URL, only if a specific URL is defined for each lang