{"id":6435,"date":"2013-01-13T00:00:00","date_gmt":"2013-01-13T00:00:00","guid":{"rendered":"https:\/\/www.globalizationpartners.com\/2013\/01\/13\/localization-services-for-android-mobile-applications\/"},"modified":"2021-01-05T12:17:32","modified_gmt":"2021-01-05T12:17:32","slug":"localization-services-for-android-mobile-applications","status":"publish","type":"post","link":"https:\/\/www.globalizationpartners.com\/2013\/01\/13\/localization-services-for-android-mobile-applications\/","title":{"rendered":"Localization Services for Android Mobile Applications"},"content":{"rendered":"<p>Consumers are using all channels available to them to interact and engage with your brand whether it be via mobile, website, email, social, brick and mortar-you name it. Marketers know they cannot risk neglecting any one channel or they might miss an opportunity.<\/p>\n<p>&#8220;Android has been one of the primary growth engines of the smartphone market since it was launched in 2008,&#8221; said\u00a0<a href=\"https:\/\/www.idc.com\/getdoc.jsp?containerId=PRF002081\">Ramon Llamas<\/a>, research manager,\u00a0<a href=\"https:\/\/www.idc.com\/getdoc.jsp?containerId=IDC_P1600\">Mobile Phones<\/a> at IDC. &#8220;In every year since then, Android has effectively outpaced the market and taken market share from the competition. In addition, the combination of smartphone vendors, mobile operators, and end-users who have embraced Android has driven shipment volumes higher. Even today, more vendors are introducing their first Android-powered smartphones to market.&#8221;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2018\/07\/android-localization_298x244.jpg\" alt=\"android-localization\" width=\"298\" height=\"244\" \/><\/p>\n<p>Top Six Smartphone Mobile Operating Systems, Shipments, and Market Share, Q3 2012 (Preliminary) (Units in Millions)<\/p>\n<table style=\"border: 1px solid #000000;\" border=\"1\" cellpadding=\"0\">\n<tbody>\n<tr style=\"border: 1px solid #000000;\">\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"146\"><strong>Operating System<\/strong><\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: center;\"><strong>3Q12 Shipment Volumes<\/strong><\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: center;\"><strong>3Q12 Market Share<\/strong><\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: center;\"><strong>3Q11 Shipment Volumes<\/strong><\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: center;\"><strong>3Q11 Market Share<\/strong><\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: center;\"><strong>Year Over Year Change<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #000000;\">\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"146\">Android<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">136.0<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">75.0%<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">71.0<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">57.5%<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">91.5%<\/p>\n<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #000000;\">\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"146\">iOS<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">26.9<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">14.9%<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">17.1<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">13.8%<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">57.3%<\/p>\n<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #000000;\">\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"146\">BlackBerry<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">7.7<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">4.3%<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">11.8<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">9.5%<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">-34.7%<\/p>\n<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #000000;\">\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"146\">Symbian<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">4.1<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">2.3%<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">18.1<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">14.6%<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">-77.3%<\/p>\n<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #000000;\">\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"146\">Windows Phone 7\/ Windows Mobile<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">3.6<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">2.0%<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">1.5<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">1.2%<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">140.0%<\/p>\n<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #000000;\">\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"146\">Linux<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">2.8<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">1.5%<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">4.1<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">3.3%<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">-31.7%<\/p>\n<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #000000;\">\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"146\">Others<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">0.0<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">0.0%<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">0.1<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">0.1%<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">-100.0%<\/p>\n<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #000000;\">\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"146\">Totals<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">181.1<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">100.0%<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">123.7<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">100.0%<\/p>\n<\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"bottom\" width=\"88\">\n<p style=\"text-align: right;\">46.4%<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Source: <a href=\"https:\/\/www.idc.com\/getdoc.jsp?containerId=prUS23771812\">https:\/\/www.idc.com<\/a><\/p>\n<p>Android was designed to run a wider number of varying devices in many different regions globally. This blog describes some best practices to consider when localizing and managing multi-language applications to help engage with your users in different locales on the Android platform.<\/p>\n<h4>Understanding Application Resources<\/h4>\n<p>Application resource files are data files (e.g. images, audio and video) used by your application. When you create a localized application, you also create one or more resource files that contain resources localized for specific cultures and locales. You can deploy these resources within your application to target one or more cultures. Additionally, Android can select and load resources from different directories, based on the current device configuration and locale.<\/p>\n<p>Globalization in the context of application development provides support for localized user interfaces and data for users in multiple cultures. The term, &#8220;globally aware application&#8221; refers to an application which was been built to present its data using the locale-sensitive symbols (e.g. currency, decimal symbols, etc.) and formats which may be applicable to the given culture.<\/p>\n<p>Software development practices encourage approaches which yield high maintainability and re-use. Application resources files (e.g. images, sprites, layouts and static strings) should be externalized from your source code. This helps development teams to easily maintain them independently and consistently (i.e. leverage build automation tools, etc.)<\/p>\n<h4>Supporting Multiple Languages with Application Resources<\/h4>\n<p>It&#8217;s always a good practice to extract UI strings from your application source code and keep them in an external file.<\/p>\n<p>To support multiple languages, you must provide additional resources for each of the target languages. You should place each type of resource in a specific subdirectory of your project&#8217;s resources (i.e. &#8220;res\/&#8221;) directory. Once you&#8217;ve decided on the languages (e.g. Three languages &#8211; English, Spanish and French) you will support, create the resource subdirectories and string\/image resource files. For example:<\/p>\n<p><em>MySuperSecretAndroidProject\/<br \/>\nres\/drawable-hdpi\/<br \/>\nbackground.png<br \/>\ndrawable-es-hdpi\/<br \/>\nbackground.png<br \/>\ndrawable-fr-hdpi\/<br \/>\nbackground.png<br \/>\nvalues\/<br \/>\nstrings.xml<br \/>\nvalues-es\/<br \/>\nstrings.xml<br \/>\nvalues-fr\/<br \/>\nstrings.xml<\/em><\/p>\n<h4>Strings<\/h4>\n<table class=\"LightShading-Accent11\" style=\"border: 1px solid #000000;\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr style=\"border: 1px solid #000000;\">\n<td style=\"border: 1px solid #000000;\" valign=\"top\" width=\"151\"><strong>Language string.xml<\/strong><\/td>\n<td valign=\"top\" width=\"189\"><strong>Destination within project<\/strong><\/td>\n<td valign=\"top\" width=\"400\"><\/td>\n<\/tr>\n<tr style=\"border: 1px solid #000000;\">\n<td style=\"border: 1px solid #000000;\" valign=\"top\" width=\"151\"><strong>English<\/strong><\/td>\n<td valign=\"top\" width=\"189\">res\/values\/string.xml<\/td>\n<td valign=\"top\" width=\"400\"><em>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&gt;<br \/>\n&lt;resources&gt;<br \/>\n&lt;string name=&#8221;title&#8221;&gt;My Super-Secret Application&lt;\/string&gt;<br \/>\n&lt;\/resources&gt;<\/em><\/td>\n<\/tr>\n<tr style=\"border: 1px solid #000000;\">\n<td style=\"border: 1px solid #000000;\" valign=\"top\" width=\"151\"><strong>Spanish<\/strong><\/td>\n<td valign=\"top\" width=\"189\">res\/values-es\/string.xml<\/td>\n<td valign=\"top\" width=\"400\"><em>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&gt;<br \/>\n&lt;resources&gt;<br \/>\n&lt;string name=&#8221;title&#8221;&gt; Mi Aplicaci\u00f3n Secret&lt;\/string&gt;<br \/>\n&lt;\/resources&gt;<\/em><\/td>\n<\/tr>\n<tr style=\"border: 1px solid #000000;\">\n<td style=\"border: 1px solid #000000;\" valign=\"top\" width=\"151\"><strong>French<\/strong><\/td>\n<td valign=\"top\" width=\"189\">res\/values-fr\/string.xml<\/td>\n<td valign=\"top\" width=\"400\"><em>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&gt;<br \/>\n&lt;resources&gt;<br \/>\n&lt;string name=&#8221;title&#8221;&gt; Mon secret application&lt;\/string&gt;<br \/>\n&lt;\/resources&gt;<\/em><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Images<\/h4>\n<table class=\"LightShading-Accent11\" style=\"border: 1px solid #000000;\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr style=\"border: 1px solid #000000;\">\n<td style=\"border: 1px solid #000000;\" valign=\"top\" width=\"310\"><strong>Language background.png<\/strong><\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"top\" width=\"310\"><strong>Destination within project<\/strong><\/td>\n<\/tr>\n<tr style=\"border: 1px solid #000000;\">\n<td style=\"border: 1px solid #000000;\" valign=\"top\" width=\"310\"><strong>English (default locale)<\/strong><\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"top\" width=\"310\">res\/drawable-hdpi\/background.png<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #000000;\">\n<td style=\"border: 1px solid #000000;\" valign=\"top\" width=\"310\"><strong>Spanish<\/strong><\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"top\" width=\"310\">res\/drawable-es-hdpi\/background.png<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #000000;\">\n<td style=\"border: 1px solid #000000;\" valign=\"top\" width=\"310\"><strong>French<\/strong><\/td>\n<td style=\"border: 1px solid #000000;\" valign=\"top\" width=\"310\">res\/drawable-fr-hdpi\/background.png<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>At runtime, the <a href=\"https:\/\/www.android.com\/\">Android system<\/a> uses the appropriate set of string resources based on the locale currently set for the user&#8217;s device.<\/p>\n<h4>Using the Localized Resources<\/h4>\n<p>Once you externalize your application resources, you can access them using resource IDs that are generated in your project&#8217;s R class.<\/p>\n<p>Therefore within your source code, you can reference a string resource with the syntax <em>R.string.&lt;string_name&gt;<\/em>.<\/p>\n<p>For example:<\/p>\n<p><code><\/code><\/p>\n<p><em>\/\/ Get a string resource from your app&#8217;s Resources<br \/>\nString title = getResources().getString(R.string.title);<\/em><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Consumers are using all channels available to them to interact and engage with your brand whether it be via mobile, website, email, social, brick and mortar-you name it. Marketers know they cannot risk neglecting any one channel or they might miss an opportunity. &#8220;Android has been one of the primary growth engines of the smartphone [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":6436,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[1269,1425,1464],"_links":{"self":[{"href":"https:\/\/www.globalizationpartners.com\/wp-json\/wp\/v2\/posts\/6435"}],"collection":[{"href":"https:\/\/www.globalizationpartners.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.globalizationpartners.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.globalizationpartners.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.globalizationpartners.com\/wp-json\/wp\/v2\/comments?post=6435"}],"version-history":[{"count":5,"href":"https:\/\/www.globalizationpartners.com\/wp-json\/wp\/v2\/posts\/6435\/revisions"}],"predecessor-version":[{"id":22472,"href":"https:\/\/www.globalizationpartners.com\/wp-json\/wp\/v2\/posts\/6435\/revisions\/22472"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.globalizationpartners.com\/wp-json\/wp\/v2\/media\/6436"}],"wp:attachment":[{"href":"https:\/\/www.globalizationpartners.com\/wp-json\/wp\/v2\/media?parent=6435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.globalizationpartners.com\/wp-json\/wp\/v2\/categories?post=6435"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.globalizationpartners.com\/wp-json\/wp\/v2\/tags?post=6435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}