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

It is possible to use global visibility tags in any page template and within any tag.

Attribuutit

separator:

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

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

With the before and after attributes, you can define content that is output before or after the content produced by the tag.

Allowed values: text that may contain HTML and Interface markup.

E.g.

  • before: '<p>This markup appears before the tag's own content.</p>'.
  • after: '<p>This appears after the tag's own content.</p>'

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

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: text that may contain HTML and Interface markup.

E.g. or:'Content not found.'