Prints the store version's language and locale as a two-letter language code and a complementary country code.

Description

Language and locale settings are often used in technical contexts to specify different language variants for various countries (such as British and American English). You can also use the tag, for example, to inform an integrated external advertising service about the language and country in which the ads are to be displayed.

The language and location specification consists of a language code and a country code as follows:
  • fi_FI = Finnish in Finland
  • sv_FI = Swedish in Finland
  • sv_SE = Swedish in Sweden
  • en_SE = English in Sweden

In MyCashflow, the language code is determined by the language of the store version, and the country code is determined by the Contact details > Country selection in either the store version settings or the store's general settings.

The {CurrentLocale} tag prints the language code in compliance with the ISO 639-1 standard.

Alternatively, the language and location settings of the online store can be composed as a combination of the {CurrentLanguageCode} and {CurrentCountryCode} tags and a suitable separator, but The language codes printed by the {CurrentLanguageCode} tag partially deviate from the ISO 639-1 standard, which is why MyCashflow's compatibility with external systems cannot be taken for granted.

Syntax

{CurrentLocale(
    separator: string
)}

Scope

Required scope: globaali

Tags with global scope can be used on any template and in any tag.

Attribuutit

separator:

Determines the separator between the language code and the country code.

Allowed values: '_' (underscore, oletusarvo) tai '-' (hyphen)
after/before:

By using the after and before attributes you can define content that is output either after or before the tag's output.

Allowed values:The HTML and Interface markup

E.g.

  • before: '<p>Tämä merkkaus näkyy ennen tagin omaa sisältöä.</p>'
  • after: '<p>Tämä taas näkyy tagin oman sisällön jälkeen.</p>'

If the tag does not produce any content, neither the content of the after and before attributes will be output.

escape:

Adds an escape character before quotation marks in the output.

The attribute makes it easier to process the tag-produced content when using JavaScript.

Allowed values:true/false. The default value is false.

or:

Defines alternative content that is displayed if the tag itself does not produce any content.

Allowed values:The HTML and Interface markup

E.g. or:'Sisältöä ei löytynyt.'