LanguageDataProvider
This documentation is for an outdated Matomo version.
Click here if you want to read this article for the latest version.
Click here if you want to read this article for the latest version.
Piwik\Intl\Data\Provider\
LanguageDataProvider
Provides language data.
Methods
The class defines the following methods:
getLanguageList()— Returns the list of valid language codes.getLanguageToCountryList()— Returns the list of language to country mappings.
getLanguageList()
Returns the list of valid language codes.
Signature
- Returns:
string[]— Array of 2 letter ISO code => language name (in english). E.g.array('en' => 'English', 'ja' => 'Japanese').
getLanguageToCountryList()
Returns the list of language to country mappings.
Signature
- Returns:
string[]— Array of 2 letter ISO language code => 2 letter ISO country code. E.g.array('fr' => 'fr') // French => France.