The HTML5 SDK usesImaSdkSettings.setLocalefor setting the language of text within UI elements.
Locale must be set beforeAdDisplayContainerandAdsLoaderhave been initialized and cannot be changed once those
objects have been created.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-05 UTC."],[[["\u003cp\u003eThe HTML5 SDK utilizes \u003ccode\u003eImaSdkSettings.setLocale\u003c/code\u003e to define the language displayed in UI elements.\u003c/p\u003e\n"],["\u003cp\u003eLocale settings must be applied before initializing \u003ccode\u003eAdDisplayContainer\u003c/code\u003e and \u003ccode\u003eAdsLoader\u003c/code\u003e, and are immutable thereafter.\u003c/p\u003e\n"],["\u003cp\u003eA comprehensive list of supported locale codes is provided, covering a wide range of languages and regional variations.\u003c/p\u003e\n"]]],[],null,["Select platform: [HTML5](/interactive-media-ads/docs/sdks/html5/client-side/localization \"View this page for the HTML5 platform docs.\") [Android](/interactive-media-ads/docs/sdks/android/client-side/localization \"View this page for the Android platform docs.\") [iOS](/interactive-media-ads/docs/sdks/ios/client-side/localization \"View this page for the iOS platform docs.\") [tvOS](/interactive-media-ads/docs/sdks/tvos/client-side/localization \"View this page for the tvOS platform docs.\")\n\nSpecify a locale\n\nThe HTML5 SDK uses [ImaSdkSettings.setLocale](/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.ImaSdkSettings#setLocale) for setting the language of text within UI elements.\nLocale must be set before `AdDisplayContainer` and\n`AdsLoader` have been initialized and cannot be changed once those\nobjects have been created. \n\n```gdscript\n google.ima.settings.setLocale('fr');\n var adContainerElement = document.getElementById('adContainer');\n var adDisplayContainer = new google.ima.AdDisplayContainer(adContainerElement);\n var adsLoader = new google.ima.AdsLoader(adDisplayContainer);\n```\n\nTry it out\n\nYou can see a working implementation in the following:\nSee the Pen \\\u003ca href='http://codepen.io/imasdk/pen/GoBZaN/'\\\u003eSetting Language \\& Locale\\\u003c/a\\\u003e by IMA SDK (\\\u003ca href='http://codepen.io/imasdk'\\\u003e@imasdk\\\u003c/a\\\u003e) on \\\u003ca href='http://codepen.io'\\\u003eCodePen\\\u003c/a\\\u003e.\n\nLocale codes IMA supports the following locale codes:\n\n| Language | Country code |\n|----------------------------------|--------------|\n| Arabic | `ar` |\n| Arabic (Egypt) | `ar_eg` |\n| Arabic (Saudi Arabia) | `ar_sa` |\n| Bulgarian | `bg` |\n| Catalan | `ca` |\n| Chinese (Simplified) | `zh` |\n| Chinese (Simplified, China) | `zh_cn` |\n| Chinese (Traditional, Hong Kong) | `zh_hk` |\n| Chinese (Traditional, Taiwan) | `zh_tw` |\n| Croatian | `hr` |\n| Czech | `cs` |\n| Danish | `da` |\n| Dutch | `nl` |\n| English | `en` |\n| English (Australia) | `en_au` |\n| English (Canada) | `en_ca` |\n| English (United Kingdom) | `en_gb` |\n| English (Ireland) | `en_ie` |\n| English (India) | `en_in` |\n| English (Singapore) | `en_sg` |\n| English (South Africa) | `en_za` |\n| Estonian | `et` |\n| Filipino | `fil` |\n| Finnish | `fi` |\n| French | `fr` |\n| French (Canada) | `fr_ca` |\n| French (Switzerland) | `fr_ch` |\n| German | `de` |\n| German (Austria) | `de_at` |\n| Greek | `el` |\n| Hebrew | `he` |\n| Hindi | `hi` |\n| Hungarian | `hu` |\n| Icelandic | `is` |\n| Indonesian | `id` |\n| Italian | `it` |\n| Japanese | `ja` |\n| Korean | `ko` |\n| Latvian | `lv` |\n| Lithuanian | `lt` |\n| Malay | `ms` |\n| Norwegian | `no` |\n| Polish | `pl` |\n| Portuguese | `pt` |\n| Portuguese (Brazil) | `pt_br` |\n| Portuguese (Portugal) | `pt_pt` |\n| Romanian | `ro` |\n| Russian | `ru` |\n| Serbian | `sr` |\n| Slovak | `sk` |\n| Slovenian | `sl` |\n| Spanish | `es` |\n| Spanish (Latin America) | `es_419` |\n| Spanish (Argentina) | `es_ar` |\n| Spanish (Chile) | `es_cl` |\n| Spanish (Colombia) | `es_co` |\n| Spanish (Costa Rica) | `es_cr` |\n| Spanish (Dominican Republic) | `es_do` |\n| Spanish (Ecuador) | `es_ec` |\n| Spanish (El Salvador) | `es_sv` |\n| Spanish (Guatemala) | `es_gt` |\n| Spanish (Honduras) | `es_hn` |\n| Spanish (Mexico) | `es_mx` |\n| Spanish (Nicaragua) | `es_ni` |\n| Spanish (Panama) | `es_pa` |\n| Spanish (Peru) | `es_pe` |\n| Spanish (Puerto Rico) | `es_pr` |\n| Spanish (Paraguay) | `es_py` |\n| Spanish (United States) | `es_us` |\n| Spanish (Uruguay) | `es_uy` |\n| Spanish (Venezuela) | `es_ve` |\n| Swedish | `sv` |\n| Thai | `th` |\n| Turkish | `tr` |\n| Ukrainian | `uk` |\n| Vietnamese | `vi` |"]]