Const// Validate a language code
const userLanguage = 'en-US';
if (languages.includes(userLanguage)) {
console.log('Language is supported');
}
// Create a language selector
languages.forEach(lang => {
console.log(`Available language: ${lang}`);
});
// Check total number of supported languages
console.log(`Total languages: ${languages.length}`);
All supported language codes for map display and service responses.
They set the language of map labels, place names, addresses and other textual content.
The array includes:
en-US,en-GB,pt-BR,pt-PT)zh-Hansfor Simplified Chinese,zh-Hantfor Traditional Chinese)ngt(Neutral Ground Truth) for language-neutral contentngt-Latn,ko-Latn-KR,ru-Latn-RU)ru-Cyrl-RU)Use it to check whether a user-provided language code is supported, to generate language selection UI or to iterate over all language options.