# Language

An object representing a language for the current shop.

# Properties

Property Type Description
uid string The unique identifier of the language as an IETF language code.
active boolean Whether the language is visible to shop visitors. This property is accessible to administrators only.
defaultCurrency string The default currency to be shown when the language is selected.

# Methods

# count

Takes a filter object and returns the number of languages found, as an integer.

# Parameters

A filter object specifying which languages to count. See Filter objects on the page List selection.

# Example

The request below returns the number of active languages.

Language.count({
  "/active": true
})

# get

Fetches information about a language.

# Parameters

Parameter Description
uid The unique identifier of the language.
query Which info to return. See Query language.

# Example

Language.get("en")

# getSchema

Fetches the JSON Schema which can be used for client-side validation.

# Parameters

The unique identifier of a language.

# list

Returns an array of objects representing languages.

# Parameters

Parameter Description
query Which info to return. See Query language.
selection Which languages to list. See List selection.