android_frameworks_base/docs/html/tools/help/translations-editor.jd
Daniel Yu f3f48b206b docs: Updating the Android Studio Translations Editor doc
Adding new Translations Editor studio help topic, and updating
TOC and index accordingly. Updated Studio Features topic to
point to new Translations Editor topic. Added new editor
screenshot. Additional fixes added based on reviews.

Bug: 25973544
Change-Id: I8f319cf6ec95f29f1cdb462efc6b3711ded6fdd8
2015-12-16 14:52:34 -08:00

134 lines
5.1 KiB
Plaintext

page.title=Translations Editor
parent.title=Tools
parent.link=index.html
page.tags=translations
@jd:body
<div id="qv-wrapper">
<div id="qv">
<h2>In this document</h2>
<ol>
<li><a href="#about">About the Translations Editor</a></li>
<li><a href="#running">Running the Translations Editor</a></li>
<li><a href="#managing">Managing String Resources</a></li>
<li><a href="#ordering">Ordering Translation Services</a></li>
</ol>
<h2>See also</h2>
<ol>
<li><a href="{@docRoot}training/basics/supporting-devices/languages.html">Supporting Different
Languages</a></li>
<li><a href="{@docRoot}guide/topics/resources/localization.html">Localizing with Resources</a>
</li>
<li><a href="{@docRoot}guide/topics/resources/providing-resources.html">Providing Resources</a>
</li>
</ol>
</div>
</div>
<p>
If your application supports multiple languages, you need to properly manage your
translated string resources. Android Studio provides the Translations Editor to make viewing and
managing your translated resources easier.
</p>
<h2 id="about">About the Translations Editor</h2>
<p>
Translated resources are stored in multiple XML files in multiple directories in your project.
Manually finding and editing resource files across many translations can be difficult. Because of
this, your application might have missing translations that go unnoticed until after your
application has been built and distributed to users.
</p>
<p>
The Translations Editor lets you view and update all your string resources in one convenient
place. The editor gives you a single view of all of your translated resources, making it easy to
change or add translations, and even find missing translations.
</p>
<img src="{@docRoot}images/tools/studio-translations-editor.png" />
<p class="img-caption"><strong>Figure 1.</strong> Manage locales and strings in the
Translations Editor.</p>
<h2 id="running">Running the Translations Editor</h2>
<p>
Follow these steps to start the Translations Editor:
</p>
<ol>
<li>In Android Studio, open an Android app project.</li>
<li>In the <em>Project</em> window, select the
<a href="{@docRoot}sdk/installing/create-project.html#ProjectView">Android view</a>.</li>
<li>Open the <strong>res</strong> folder, and then open the <strong>values</strong> folder.</li>
<li>If a <strong>strings.xml</strong> folder is present, open this folder.</li>
<li>Right-click the <code>strings.xml</code> file (not folder) and select <strong>Open
Translations Editor</strong>.</li>
</ol>
<p>
You can also access the Translations Editor by opening a <code>strings.xml</code> file for editing
and clicking the <strong>Open editor</strong> link, or clicking the globe icon
<img src="{@docRoot}images/tools/studio-globe-icon.png" alt=""/> in the Design layout view and
choosing <strong>Edit Translations</strong>.
</p>
<h2 id="managing">Managing String Resources</h2>
<p>
The Translations Editor provides a view of all your string resources and current locale
translations. The name of each resource is listed in the Key column, along with a default value
for the key, a checkbox to mark the key as untranslatable, and values for each locale translation.
</p>
<p>
Edit translations by double-clicking on the translation and editing the value directly
in the list view, or selecting the translation and editing the <strong>Translation</strong> field
value at the bottom of the editor. The default value can be edited by double-clicking on
the default value or selecting the default value and updating the <strong>Default Value</strong>
field.</p>
<p>
If a resource is missing a translation and isn't marked untranslatable, the key name is
displayed in red. If you hover over a red resource, Android Studio displays details about the
missing translations.
</p>
<h3 id="adding">Adding a new string resource</h3>
<p>
Add a new resource by clicking the add icon <img src="{@docRoot}images/tools/studio-add-icon.png"
alt=""/>. Android Studio prompts you for a key name,
default value, and resource folder that contains the <code>strings.xml</code> file where the new
resource is added.
</p>
<h3 id="adding_locales">Adding additional locales</h3>
<p>
Add additional locales by pressing the globe icon
<img src="{@docRoot}images/tools/studio-globe-icon.png" alt=""/> and selecting the locale you want
to add. The Translations Editor adds the new locale column and creates the translation strings XML
file in the appropriate project directory.
</p>
<p>
The Translations Editor has
<a class="external-link" href="https://tools.ietf.org/html/bcp47">BCP 47</a> support, and
combines language and region codes into a single selection for targeted localizations.
</p>
<h2 id="ordering">Ordering Translation Services</h2>
<p>
Clicking the <strong>Order a translation</strong> link opens a page in your browser where you
can upload string resource XML files and order translation services. App translation services are
available from Google Play and other vendors. For more information about Google Play App
Translation Services, see the <a class="external-link"
href="http://android-developers.blogspot.com/2013/11/app-translation-service-now-available.html">
Google Play App Translation Service</a> announcement.
</p>