The IMA SDK lets you specify the language to be used to localize ads and
the player UI controls. To do so, use theImaSdkSettings.setLanguage()method with the appropriatelocale codeas demonstrated in the code snippet:
// Create an AdsLoader and optionally set the language.ImaSdkSettingsimaSdkSettings=ImaSdkFactory.getInstance().createImaSdkSettings();imaSdkSettings.setLanguage('fr');mSdkFactory=ImaSdkFactory.getInstance();mAdDisplayContainer=mSdkFactory.createAdDisplayContainer();mAdDisplayContainer.setPlayer(mVideoPlayerWithAdPlayback.getVideoAdPlayer());mAdDisplayContainer.setAdContainer(mVideoPlayerWithAdPlayback.getAdUiContainer());mAdsLoader=mSdkFactory.createAdsLoader(context,imaSdkSettings,mAdDisplayContainer);
To set the language within theBasicExamplewhich uses the
Exoplayer-IMA extension, a modification needs to be made to setImaSdkSettings:
[[["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 IMA SDK allows you to localize ads and UI elements by setting the language using \u003ccode\u003eImaSdkSettings.setLanguage()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eYou can integrate language settings into the BasicExample by modifying \u003ccode\u003eVideoPlayerController.java\u003c/code\u003e and building the \u003ccode\u003eImaAdsLoader\u003c/code\u003e with the desired language.\u003c/p\u003e\n"],["\u003cp\u003eThe IMA SDK supports a wide variety of language locale codes, including regional variations for languages like Arabic, English, Spanish, and Chinese.\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 language\n\nThe IMA SDK lets you specify the language to be used to localize ads and\nthe player UI controls. To do so, use the\n[ImaSdkSettings.setLanguage()](/interactive-media-ads/docs/sdks/android/client-side/api/reference/com/google/ads/interactivemedia/v3/api/ImaSdkSettings#setLanguage(java.lang.String)) method with the appropriate\n[locale code](#locale-codes) as demonstrated in the code snippet: \n\n```scilab\n // Create an AdsLoader and optionally set the language.\n ImaSdkSettings imaSdkSettings = ImaSdkFactory.getInstance().createImaSdkSettings();\n imaSdkSettings.setLanguage('fr');\n mSdkFactory = ImaSdkFactory.getInstance();\n\n mAdDisplayContainer = mSdkFactory.createAdDisplayContainer();\n mAdDisplayContainer.setPlayer(mVideoPlayerWithAdPlayback.getVideoAdPlayer());\n mAdDisplayContainer.setAdContainer(mVideoPlayerWithAdPlayback.getAdUiContainer());\n mAdsLoader = mSdkFactory.createAdsLoader(context, imaSdkSettings, mAdDisplayContainer);\n```\n\nTo set the language within the\n[BasicExample](https://github.com/googleads/googleads-ima-android/blob/main/basicexample/) which uses the\nExoplayer-IMA extension, a modification needs to be made to set `ImaSdkSettings`:\n\nVideoPlayerController.java \n\n```transact-sql\n@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_my);\n\n playerView = findViewById(R.id.player_view);\n\n ImaSdkSettings imaSdkSettings = ImaSdkFactory.getInstance().createImaSdkSettings();\n imaSdkSettings.setLanguage(\"fr\");\n ImaAdsLoader.Builder builder = new ImaAdsLoader.Builder(this).setImaSdkSettings(imaSdkSettings);\n\n adsLoader = builder.buildForAdTag(Uri.parse(getString(R.string.ad_tag_url)));\n }\n```\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` |"]]