localization.jd revision 12a5475205243bc2d069a87d2c7d4982b5f4d11d
1page.title=Localization
2parent.title=Application Resources
3parent.link=index.html
4@jd:body
5
6<div id="qv-wrapper">
7    <div id="qv">
8
9<h2>Localization quickview</h2>
10
11<ul>
12  <li>Android lets you create different resource sets for different locales.</li>
13  <li>When your application runs, Android will load the resource set
14that match the device's locale.</li>
15  <li>If locale-specific resources are not available, Android falls back to
16defaults.</li>
17  <li>The emulator has features for testing localized apps. </li>
18</ul>
19
20<h2>In this document</h2>
21<ol>
22  <li><a href="#resource-switching">Overview: Resource-Switching in Android</a>
23
24</li>
25<ol><li><a href="#defaults-r-important">Why Default Resources Are Important</a></li></ol>
26<li><a href="#using-framework">Using Resources for Localization</a>
27  <ol>
28    <li><a href="#creating-defaults">How to Create Default Resources</a></li>
29    <li><a href="#creating-alternatives">How to Create Alternative Resources</a></li>
30    <li><a href="#resource-precedence">Which Resources Take Precedence?</a></li>
31    <li><a href="#referring-to-resources">Referring to Resources in Java</a></li>
32  </ol>
33</li>
34<li><a href="#strategies">Localization Strategies</a></li>
35<li><a href="#testing">Testing Localized Applications</a></li>
36  <ol>
37  <li><a href="#device">Testing on a Device</a></li>
38  <li><a href="#emulator">Testing on an Emulator</a></li>
39  <li><a href="#test-for-default">Testing for Default Resources</a></li>
40  </ol>
41<li><a href="#checklist">Localization Checklists</a></li>
42  <ol>
43  <li><a href="#planning-checklist">Planning and Design Checklist</a></li>
44  <li><a href="#content-checklist">Content Checklist</a></li>
45  <li><a href="#testing-checklist">Testing and Publishing Checklist</a></li>
46  </ol>
47</ol>
48
49<h2>See also</h2>
50  <ol>
51    <li><a href="{@docRoot}guide/topics/resources/providing-resources.html">Providing Resources</a></li>
52    <li><a href="{@docRoot}guide/topics/ui/declaring-layout.html">Layouts</a></li>
53    <li><a href="{@docRoot}reference/android/app/Activity.html#ActivityLifecycle">Activity Lifecycle</a></li>
54</ol>
55</div>
56</div>
57
58<p>Android will run on many  devices in many  regions. To reach the most users,
59your application should handle text, audio files, numbers, currency, and
60graphics in ways appropriate to the locales where your application will be used.
61</p>
62
63<p>This document describes best practices for localizing Android
64applications. The principles apply whether you are developing your application  
65using ADT with Eclipse, Ant-based tools, or any other IDE. </p>
66
67<p>You should already have a working knowledge of Java and be  familiar with
68Android resource loading, the declaration of user interface elements in XML,
69development considerations such as Activity lifecycle, and general principles of
70internationalization and localization. </p>
71
72<p>It is good practice to use the Android resource framework to separate the
73localized aspects of your application as much as possible from the core Java
74functionality:</p>
75
76<ul>
77  <li>You can put most or all of the <em>contents</em> of your application's
78user interface into resource files, as described in this document and in <a
79href="{@docRoot}guide/topics/resources/providing-resources.html">Providing Resources</a>.</li>
80  <li>The <em>behavior</em> of the user interface, on the other hand, is driven
81by your Java code. 
82    For example, if users input data that needs to be formatted or sorted
83differently depending on locale, then you would use Java to handle the data
84programmatically. This document does not cover how to  localize your Java code.
85</li>
86</ul>
87
88<p>For a short guide to localizing strings in your app, see the training lesson, <a
89href="{@docRoot}training/basics/supporting-devices/languages.html">Supporting Different Languages</a>. </p>
90
91
92<h2 id="resource-switching">Overview: Resource-Switching in Android</h2>
93
94<p>Resources are text strings, layouts, sounds, graphics, and any other static
95data that your  Android application  needs. An application can include multiple
96sets of resources, each customized for a different device configuration. When a
97user runs the application,  Android    automatically selects and loads the 
98resources that best match the device.</p>
99
100<p>(This document focuses on localization and locale. For a complete description
101of resource-switching and all the types of configurations that you can
102specify &#8212; screen orientation, touchscreen type, and so on &#8212; see <a
103href="{@docRoot}guide/topics/resources/providing-resources.html#AlternativeResources">Providing
104Alternative Resources</a>.)</p>
105
106<table border="0" cellspacing="0" cellpadding="0">
107  <tr border="0">
108    <td width="180" style="border: 0pt none ;"><p class="special-note">
109    <strong>When you write your application:</strong>
110    <br><br>
111    You create a set of default resources, plus alternatives to be used in
112    different locales.</p></td>
113    <td style="border: 0pt none; padding:0">
114    <p style="border:0; padding:0"><img src="../../../images/resources/right-arrow.png" alt="right-arrow" 
115    width="51" height="17"></p></td>
116    <td width="180" style="border: 0pt none ;"><p class="special-note">
117    <strong>When a user runs your application:</strong>
118    <br><br>The Android system selects which resources to load, based on the
119    device's locale.</p></td>
120  </tr>
121</table>
122
123<p>When you write your application, you create default and alternative resources
124for your application to use. To create  resources, you place files within
125specially named subdirectories of the project's <code>res/</code> directory.
126</p>
127
128
129
130<h3 id="defaults-r-important">Why Default Resources Are Important</h3>
131
132<p>Whenever the application runs in a locale for which you have not provided
133locale-specific text,  Android will load the default strings from
134<code>res/values/strings.xml</code>. If this default  file is absent, or if it 
135is missing a string that your application needs, then your application will not run 
136and will show an error. 
137The example below illustrates what can happen when the default text file is incomplete. </p>
138
139<p><em>Example:</em>
140<p>An application's Java code refers to just two strings, <code>text_a</code> and 
141	<code>text_b</code>. This application includes a localized resource file 
142	(<code>res/values-en/strings.xml</code>) that defines <code>text_a</code> and 
143	<code>text_b</code> in English. This application also includes a default 
144	resource file (<code>res/values/strings.xml</code>) that includes a
145definition for <code>text_a</code>, but not for <code>text_b</code>:
146<ul>
147  <li>This application might compile without a problem. An IDE such as Eclipse 
148  	will not highlight any errors if a resource is missing.</li>
149  <li>When this application is launched on a device with locale set to English, 
150  	the application  might run without a problem, because 
151  	<code>res/values-en/strings.xml</code> contains both of the needed text 
152  	strings.</li>
153  <li>However, <strong>the user  will see an error message and a Force Close 
154  	button</strong> when this application is launched on a device set to a 
155  	language other than English. The application will not load.</li>
156</ul>
157
158
159<p>To prevent this situation, make sure that a <code>res/values/strings.xml</code> 
160	file exists and that it defines every needed string. The situation applies to 
161	all types of resources, not just strings: You 
162	need to create a  set of default resource files containing all 
163	the resources that your application calls upon &#8212; layouts, drawables, 
164	animations, etc. For information about testing, see <a href="#test-for-default">
165	Testing for Default Resources</a>.</p>
166
167<h2 id="using-framework">Using Resources for Localization</h2>
168
169<h3 id="creating-defaults">How to Create Default Resources</h3>
170
171<p>Put the application's default text in
172a file with the following location and name:</p>
173<p><code>&nbsp;&nbsp;&nbsp;&nbsp;res/values/strings.xml</code> (required directory)</p>
174
175<p>The text strings in <code>res/values/strings.xml</code> should  use the
176default language, which is the language that you expect most of your application's users to
177speak.  </p>
178
179<p>The default resource set must also include any default drawables and layouts, 
180	and can include other types of resources such as animations. 
181<br>
182  <code>&nbsp;&nbsp;&nbsp;&nbsp;res/drawable/</code>(required directory holding at least
183  one graphic file, for the application's icon on Google Play)<br>
184  <code>&nbsp;&nbsp;&nbsp;&nbsp;res/layout/</code> (required directory holding an XML
185  file that defines the default layout)<br>
186  <code>&nbsp;&nbsp;&nbsp;&nbsp;res/anim/</code> (required if you have any 
187  <code>res/anim-<em>&lt;qualifiers&gt;</em></code> folders)<br>
188  <code>&nbsp;&nbsp;&nbsp;&nbsp;res/xml/</code> (required if you have any 
189  <code>res/xml-<em>&lt;qualifiers&gt;</em></code> folders)<br>
190  <code>&nbsp;&nbsp;&nbsp;&nbsp;res/raw/</code> (required if you have any 
191  <code>res/raw-<em>&lt;qualifiers&gt;</em></code> folders)
192</p>
193
194<p class="note"><strong>Tip:</strong> In your code, examine each reference to 
195	an Android resource. Make sure that a default resource is defined for each
196	one. Also make sure that the default string file is complete: A <em>
197	localized</em> string file can contain a subset of the strings, but the 
198	<em>default</em> string file must contain them all. 
199</p>
200
201<h3 id="creating-alternatives">How to Create Alternative Resources</h3>
202
203<p>A large part of localizing an application is providing alternative text for
204different languages. In some cases you will also provide alternative graphics,
205sounds, layouts, and other locale-specific resources. </p>
206
207<p>An application can specify many <code>res/<em>&lt;qualifiers&gt;</em>/</code>
208directories, each with different qualifiers. To create an alternative resource for
209a different locale, you use a qualifier that specifies a language or a 
210language-region combination. (The name of a resource directory must conform 
211to the naming scheme described in 
212<a href="{@docRoot}guide/topics/resources/providing-resources.html#AlternativeResources">Providing
213Alternative Resources</a>,
214or else it will not compile.)</p>
215
216<p><em>Example:</em></p>
217
218<p>Suppose that your application's default language is English. Suppose also
219that you want to localize all the text in your application to French, and most
220of the text in your application (everything except the application's title) to
221Japanese. In this case, you could create three alternative <code>strings.xml</code>
222files, each stored in a locale-specific resource directory:</p>
223
224<ol>
225  <li><code>res/values/strings.xml</code><br>
226    Contains  English text for all  the strings that the application uses,
227including text for a string named <code>title</code>.</li>
228  <li><code>res/values-fr/strings.xml</code><br>
229    Contain French text for all  the strings, including <code>title</code>.</li>
230  <li><code>res/values-ja/strings.xml</code><br>
231    Contain Japanese text for all  the strings <em>except</em>
232<code>title</code>.<br>
233  <code></code></li>
234</ol>
235
236<p>If your Java code refers to <code>R.string.title</code>,  here is what will
237happen at runtime:</p>
238
239<ul>
240  <li>If the device is set to any language other than French, Android will load
241<code>title</code> from the <code>res/values/strings.xml</code> file.</li>
242  <li>If the device is set to French, Android will load <code>title</code> from
243the <code>res/values-fr/strings.xml</code> file.</li>
244</ul>
245
246<p>Notice that if the device is set to Japanese, Android will look for
247<code>title</code> in the <code>res/values-ja/strings.xml</code> file. But
248because no such string is included in that file, Android will fall back to the
249default, and will load  <code>title</code> in English from the
250<code>res/values/strings.xml</code> file.  </p>
251
252<h3 id="resource-precedence">Which Resources Take Precedence?</h3>
253
254<p> If multiple resource files match a device's configuration, Android follows a
255set of rules in deciding which file to use. Among the qualifiers that can be
256specified in a resource directory name, <strong>locale almost always takes
257precedence</strong>. </p>
258<p><em>Example:</em></p>
259
260<p>Assume that an application  includes a default set of graphics and two other
261sets of graphics, each optimized for a different device setup:</p>
262
263<ul>
264  <li><code>res/drawable/</code><br>
265    Contains
266  default graphics.</li>
267  <li><code>res/drawable-small-land-stylus/</code><br>
268  Contains  graphics optimized for use with a device that expects input from a 
269  stylus and has a QVGA low-density screen in landscape orientation.</li>
270  <li><code>res/drawable-ja/</code> <br>
271  Contains  graphics optimized for use with Japanese.</li>
272</ul>
273
274<p>If the application runs on a device that is configured to use Japanese,
275Android will load graphics from  <code>res/drawable-ja/</code>, even if the
276device happens to be one that expects input from a stylus and has a QVGA 
277low-density screen in landscape orientation.</p>
278
279<p class="note"><strong>Exception:</strong> The only qualifiers that take
280precedence over locale in the selection process are MCC and MNC (mobile country
281code and mobile network code). </p>
282
283<p><em>Example:</em></p>
284
285<p>Assume that you have the following situation:</p>
286
287<ul>
288  <li>The application code calls for <code>R.string.text_a</code></li>
289  <li>Two relevant resource files are available:
290    <ul>
291      <li><code>res/values-mcc404/strings.xml</code>, which includes
292<code>text_a</code> in the application's default language, in this case
293English.</li>
294      <li><code>res/values-hi/strings.xml</code>, which includes
295<code>text_a</code> in Hindi.</li>
296    </ul>
297  </li>
298  <li>The application is running on a device that has the following
299configuration:
300    <ul>
301      <li>The SIM card is connected to a mobile network in India (MCC 404).</li>
302      <li>The language is set to Hindi (<code>hi</code>).</li>
303    </ul>
304  </li>
305</ul>
306
307<p>Android will load <code>text_a</code> from
308<code>res/values-mcc404/strings.xml</code> (in English), even if the device is
309configured for Hindi. That is because in the resource-selection process, Android
310will prefer an MCC match over a language match. </p>
311
312<p>The selection process is not always as straightforward as these examples
313suggest. Please read  <a
314href="{@docRoot}guide/topics/resources/providing-resources.html#BestMatch">How Android Finds
315the Best-matching Resource</a> for a more nuanced description of the
316process. All the qualifiers are described and listed in order of
317precedence in <a
318href="{@docRoot}guide/topics/resources/providing-resources.html#table2">Table 2 of Providing
319Alternative Resources</a>.</p>
320
321<h3 id="referring-to-resources">Referring to Resources in Java</h3>
322
323<p>In your application's Java code, you refer to  resources using the syntax
324<code>R.<em>resource_type</em>.<em>resource_name</em></code> or
325<code>android.R.<em>resource_type</em>.<em>resource_name</em></code><em>.</em>
326For more about this, see <a
327href="{@docRoot}guide/topics/resources/accessing-resources.html">Accessing Resources</a>.</p>
328
329<h2 id="strategies">Localization Strategies</h2>
330
331<h4 id="failing2">Design your application  to work in any locale</h4>
332
333<p>You cannot assume anything about the device on which a user will
334run your application. The device might have hardware that you were not
335anticipating, or it might be set to a locale that you did not plan for or that 
336you cannot test. Design your application so that it will function normally or fail gracefully no 
337matter what device it runs on.</p>
338
339<p class="note"><strong>Important:</strong> Make sure that your application
340includes a full set of default resources.</p> <p>Make sure to include
341<code>res/drawable/</code> and a <code>res/values/</code> folders (without any
342additional modifiers in the folder names) that contain all the images and text
343that your application will need. </p>
344
345<p>If an application is missing even one default resource, it will not run on a 
346	device that is set to an unsupported locale. For example, the 
347	<code>res/values/strings.xml</code> default file might lack one string that 
348	the application needs: When the application runs in an unsupported locale and 
349	attempts to load <code>res/values/strings.xml</code>, the user will see an 
350	error message and a Force Close button. An IDE such as Eclipse will not 
351	highlight this kind of error, and you will not see the problem when you 
352	test the application on a device or emulator that is set to a supported locale.</p>
353
354<p>For more information, see <a href="#test-for-default">Testing for Default Resources</a>.</p>
355
356<h4>Design a flexible layout</h4>
357
358<p> If you need to rearrange your layout to fit a certain language (for example
359German with its long words), you can create an alternative layout for that
360language (for example <code>res/layout-de/main.xml</code>). However, doing this
361can make your application harder to maintain.  It is better to create a single
362layout that is more flexible.</p>
363
364<p>Another typical situation is a language that requires something different in
365its layout. For example, you might have a contact form that should include  two
366name fields when the application runs in Japanese, but three name fields when
367the application  runs in some other language. You could handle this in either of
368two ways:</p>
369
370<ul>
371  <li>Create  one  layout with a field that you can programmatically enable or
372disable, based on the language, or</li>
373  <li>Have the main layout include another layout that  includes the changeable
374field. The second layout can have different configurations for different
375languages.</li>
376</ul>
377
378<h4>Avoid creating more resource files and text strings than you need</h4>
379
380<p>You probably do not need to create a locale-specific
381alternative for every resource in your application. For example, the layout
382defined in the <code>res/layout/main.xml</code> file might work in any locale,
383in which case there would be no need to create any alternative layout files.
384</p>
385
386<p>Also, you might not need to create alternative text for every
387string. For example, assume the following:</p>
388
389<ul>
390  <li>Your application's default language is American
391English. Every string that the application uses is defined, using American
392English spellings, in <code>res/values/strings.xml</code>. </li>
393
394  <li>For  a few important phrases, you want to provide
395British English spelling. You want these alternative strings to be used when your
396application runs on a device in the United Kingdom. </li>
397</ul>
398
399<p>To do this, you could create a small file called
400<code>res/values-en-rGB/strings.xml</code> that includes only the strings that
401should be different when the application  runs in the U.K. For all the rest of
402the strings, the application will fall back to the defaults and use what is
403defined in <code>res/values/strings.xml</code>.</p>
404
405<h4>Use the Android Context object for manual locale lookup</h4>
406
407<p>You can look up the locale using the {@link android.content.Context} object
408that Android makes available:</p>
409
410<pre>String locale = context.getResources().getConfiguration().locale.getDisplayName();</pre>
411
412<h2 id="testing">Testing Localized Applications</h2>
413
414<h3 id="device">Testing on a Device</h3>
415<p>Keep in mind that the device you are testing may be significantly different from 
416	the devices available to consumers in other geographies. The locales available 
417	on your device may differ from those available on other devices. Also, the 
418	resolution and density of the device screen may differ, which could affect 
419	the display of strings and drawables in your UI.</p>
420
421<p>To change the locale on a device, use  the Settings application  (Home &gt;
422Menu &gt; Settings &gt; Locale &amp; text &gt; Select locale). </p>
423
424<h3 id="emulator">Testing on an Emulator</h3>
425
426<p>For details about using the emulator, see See <a
427href="{@docRoot}tools/help/emulator.html">Android Emulator</a>.</p>
428<h4>Creating and using a custom locale</h4>
429
430<p>A &quot;custom&quot; locale is a language/region combination that the Android
431system image does not explicitly support. (For a list of supported locales in
432Android platforms see the Version Notes in the <a
433href="{@docRoot}sdk/index.html">SDK</a> tab). You can test
434how your application will run in a custom locale by creating a custom locale in
435the emulator. There are two ways to do this:</p>
436
437<ul>
438  <li>Use the Custom Locale application, which is accessible from the
439Application tab. (After you create a custom locale, switch to it by 
440pressing and holding the locale name.)</li>
441  <li>Change to a custom locale from the adb shell, as described below.</li>
442</ul>
443
444<p>When you set the emulator to a locale that is not available in the Android
445system image, the system itself will display in its default language. Your
446application, however, should localize properly.</p>
447
448<h4>Changing the emulator locale from the adb shell</h4>
449
450<p>To change the locale in the emulator by using the adb shell. </p>
451
452<ol>
453  <li>Pick the locale you want to test and determine its language and region codes, for
454example <code>fr</code> for French and <code>CA</code> for Canada.<br>
455  </li>
456  <li>Launch an emulator.</li>
457  <li>From a command-line shell on the host computer, run the following
458command:<br>
459    <code>adb shell</code><br>
460  or if you have a device attached, specify that you want the emulator by adding
461the <code>-e</code> option:<br>
462  <code>adb -e shell</code></li>
463  <li>At  the  adb shell prompt (<code>#</code>), run this command: <br>
464    <code>setprop persist.sys.language  [<em>language code</em>];setprop
465persist.sys.country [<em>country  code</em>];stop;sleep 5;start <br>
466    </code>Replace bracketed sections with the  appropriate codes from Step
4671.</li>
468</ol>
469
470<p>For instance, to test in Canadian French:</p>
471
472<p><code>setprop persist.sys.language  fr;setprop persist.sys.country
473CA;stop;sleep 5;start </code></p>
474
475<p>This will cause the emulator  to restart. (It will look like a full reboot,
476but it is not.) Once the Home screen appears again, re-launch your application (for
477example, click the Run icon in Eclipse), and the application will launch with
478the new locale. </p>
479
480<h3 id="test-for-default">Testing for Default Resources</h3>
481<p>Here's how to test whether an application includes every string resource that it needs:  </p>
482<ol><li>Set the emulator or device to a language that your application does not 
483	support. For example, if the application has French strings in 
484	<code>res/values-fr/</code> but does not have any Spanish strings in 
485	<code>res/values-es/</code>, then set the emulator's locale to Spanish. 
486	(You can use the Custom Locale application to set the emulator to an 
487	unsupported locale.)</li>
488	<li>Run the application.</li>  
489<li>If the application shows an error message and a Force Close button, it might 
490	be looking for a string that is not available. Make sure that your 
491	<code>res/values/strings.xml</code> file includes a definition for 
492	every string that the application uses.</li>
493</ol> 
494</p> 
495
496<p>If the test is successful, repeat it for other types of 
497	configurations. For example, if the application has a layout file called 
498	<code>res/layout-land/main.xml</code> but does not contain a file called 
499	<code>res/layout-port/main.xml</code>, then set the emulator or device to 
500	portrait orientation and see if the application will run. 
501
502
503<h2 id="checklist">Localization Checklists</h2>
504
505<p>These  checklists summarize the process of localizing an Android application.
506Not everything on these lists will apply to every application.</p>
507
508<h3 id="planning-checklist">Planning and Design Checklist</h3>
509
510<table  width="100%" border="0" cellpadding="5" cellspacing="0">
511  <tr>
512    <td valign="top" align="center"><img src="../../../images/resources/arrow.png" alt="arrow" width="26"
513border="0"></td>
514    <td>Choose a localization strategy. Which countries and which languages will
515your application support? What is your application's default country and
516language? How will your application behave when it does not have specific
517resources available for a given locale?</td>
518  </tr>
519  <tr>
520    <td valign="top" align="center"><img src="../../../images/resources/arrow.png" alt="arrow" width="26"
521border="0"></td>
522    <td><p>Identify everything in your application   that will need to be
523localized: </p>
524      <ul>
525        <li>Consider  specific details of your application &#8212; text,  images, 
526sounds, music, numbers, money, dates and times. You might not need to localize
527everything. For example, you don't need to localize text that the user never
528sees, or images that are culturally neutral, or icons that convey the same
529meaning in every locale. </li>
530        <li>Consider broad themes. For example, if you hope to sell your
531application in two very culturally different markets, you might want to design
532your UI and present your application in an entirely different way for each
533locale.</li>
534    </ul></td>
535  </tr>
536  <tr>
537    <td valign="top" align="center"><img src="../../../images/resources/arrow.png" alt="arrow" width="26"
538border="0"></td>
539    <td><p>Design your Java code to externalize resources wherever possible:</p>
540      <ul>
541        <li>Use <code>R.string</code> and <code>strings.xml</code> files instead
542of hard-coded strings or string constants. </li>
543        <li>Use <code>R.drawable</code> and <code>R.layout</code> instead of 
544hard-coded drawables or layouts. </li>
545    </ul></td>
546  </tr>
547</table>
548<h3 id="content-checklist">Content Checklist</h3>
549<table border="0" cellspacing="0" cellpadding="5"  width="100%">
550  <tr>
551    <td valign="top" align="center"><img src="../../../images/resources/arrow.png" alt="arrow" width="26"
552border="0"></td>
553    <td>Create a full set of default resources in <code>res/values/</code> and
554other <code>res/</code> folders, as described in <a
555href="#creating-defaults">Creating Default Resources</a>.</td>
556  </tr>
557  <tr>
558    <td valign="top" align="center"><img src="../../../images/resources/arrow.png" alt="arrow" width="26"
559border="0"></td>
560    <td>Obtain reliable translations of  the static text, including menu text,
561button names, error messages, and help text. Place the translated strings in
562<code>res/values-<em>&lt;qualifiers&gt;</em>/strings.xml</code> files. </td>
563  </tr>
564  <tr>
565    <td valign="top" align="center"><img src="../../../images/resources/arrow.png" alt="arrow" width="26"
566border="0"></td>
567    <td>Make sure that your application correctly formats dynamic text (for
568example numbers and dates) for each supported locale. Make sure that your
569application handles word breaks, punctuation, and alphabetical sorting correctly
570for each supported language.</td>
571  </tr>
572  <tr>
573    <td valign="top" align="center"><img src="../../../images/resources/arrow.png" alt="arrow" width="26"
574border="0"></td>
575    <td>If necessary, create locale-specific versions of your graphics and
576layout, and place them in <code>res/drawable-<em>&lt;qualifiers&gt;</em>/</code> and
577<code>res/layout-<em>&lt;qualifiers&gt;</em>/</code> folders.</td>
578  </tr>
579  <tr>
580    <td valign="top" align="center"><img src="../../../images/resources/arrow.png" alt="arrow" width="26"
581border="0"></td>
582    <td>Create any other localized content that your application requires; for
583example, create recordings of sound files for each language, as needed.</td>
584  </tr>
585</table>
586<h3 id="testing-checklist">Testing and Publishing Checklist</h3>
587    <table border="0" cellspacing="0" cellpadding="5" width="100%">
588  <tr>
589    <td valign="top" align="center"><img src="../../../images/resources/arrow.png" alt="arrow" width="26"
590border="0"></td>
591    <td>Test your application for each supported locale. If possible, have a
592person who is native to each locale test your application and give you
593feedback.</td>
594  </tr>
595  <tr>
596    <td valign="top" align="center"><img src="../../../images/resources/arrow.png" alt="arrow" width="26"
597border="0"></td>
598    <td>Test the default resources by loading a locale that is not available on 
599    	the device or emulator. For instructions, see <a href="#test-for-default">
600    		Testing for Default Resources</a>.  </td>
601  </tr>
602    <tr>
603    <td valign="top" align="center"><img src="../../../images/resources/arrow.png" alt="arrow" width="26"
604border="0"></td>
605    <td>Test the localized strings in both landscape and portrait display modes.</td>
606  </tr>
607    <tr>
608    <td valign="top" align="center"><img src="../../../images/resources/arrow.png" alt="arrow" width="26"
609border="0"></td>
610    <td>Sign your application and create your final build or builds.</td>
611  </tr>
612  <tr>
613    <td valign="top" align="center"><img src="../../../images/resources/arrow.png" alt="arrow" width="26"
614border="0"></td>
615    <td>Upload your .apk file or files to Google Play, selecting the appropriate
616languages as
617    you upload.</td>
618  </tr>
619</table>