add localize langs for global strings

Change-Id: I90412e1e03a2676d927796187fe811481bf38455
This commit is contained in:
Scott Main 2012-09-21 20:32:56 -07:00
parent 582db97b23
commit dd3d3eea1d
4 changed files with 182 additions and 25 deletions

View file

@ -980,7 +980,7 @@ function requestAppendHL(uri) {
function changeTabLang(lang) { function changeTabLang(lang) {
var nodes = $("#header-tabs").find("."+lang); var nodes = $("#header,#nav-x,.training-nav-top").find("."+lang);
for (i=0; i < nodes.length; i++) { // for each node in this language for (i=0; i < nodes.length; i++) { // for each node in this language
var node = $(nodes[i]); var node = $(nodes[i]);
node.siblings().css("display","none"); // hide all siblings node.siblings().css("display","none"); // hide all siblings

View file

@ -8,16 +8,40 @@
</a> </a>
<div class="btn-quicknav" id="btn-quicknav"> <div class="btn-quicknav" id="btn-quicknav">
<a href="#" class="arrow-inactive">Quicknav</a> <a href="#" class="arrow-inactive">Quicknav</a>
<a href="#" class="arrow-active">Quicknav</a> <a href="#" class="arrow-active">Quicknav</a>
</div> </div>
</div> </div>
<ul class="nav-x col-9"> <ul class="nav-x col-9">
<li class="design"><a href="<?cs var:toroot ?>design/index.html" <?cs <li class="design"><a href="<?cs var:toroot ?>design/index.html" <?cs
if:design ?>class="selected"<?cs /if ?> >Design</a></li> if:design ?>class="selected"<?cs /if ?> >
<span class="en">Design</span>
<span class="zh-TW" style="display:none"></span>
<span class="zh-CN" style="display:none"></span>
<span class="ru" style="display:none">Проектирование</span>
<span class="ko" style="display:none"></span>
<span class="ja" style="display:none"></span>
<span class="es" style="display:none">Diseñar</span>
</a></li>
<li class="develop"><a href="<?cs var:toroot ?>develop/index.html" <?cs <li class="develop"><a href="<?cs var:toroot ?>develop/index.html" <?cs
if:training || guide || reference || tools || develop ?>class="selected"<?cs /if ?> >Develop</a></li> if:training || guide || reference || tools || develop ?>class="selected"<?cs /if ?> >
<span class="en">Develop</span>
<span class="zh-TW" style="display:none"></span>
<span class="zh-CN" style="display:none"></span>
<span class="ru" style="display:none">Разработка</span>
<span class="ko" style="display:none"></span>
<span class="ja" style="display:none"></span>
<span class="es" style="display:none">Desarrollar</span>
</a></li>
<li class="distribute last"><a href="<?cs var:toroot ?>distribute/index.html" <?cs <li class="distribute last"><a href="<?cs var:toroot ?>distribute/index.html" <?cs
if:distribute ?>class="selected"<?cs /if ?> >Distribute</a></li> if:distribute ?>class="selected"<?cs /if ?> >
<span class="en">Distribute</span>
<span class="zh-TW" style="display:none"></span>
<span class="zh-CN" style="display:none"></span>
<span class="ru" style="display:none">Распространение</span>
<span class="ko" style="display:none"></span>
<span class="ja" style="display:none"></span>
<span class="es" style="display:none">Distribuir</span>
</a></li>
</ul> </ul>
<!-- New Search --> <!-- New Search -->
@ -52,9 +76,9 @@
<option value="ja"></option> <option value="ja"></option>
<option value="ko"></option> <option value="ko"></option>
<option value="ru">Русский</option> <option value="ru">Русский</option>
<option value="zh-CN"> () <option value="zh-CN"> ()</option>
</option> <option value="zh-TW"> ()</option>
</select> </select>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
<!-- <!--
@ -105,10 +129,42 @@ onkeyup="return search_changed(event, false, '<?cs var:toroot ?>')" />
</li> </li>
<li class="develop"> <li class="develop">
<ul> <ul>
<li><a href="<?cs var:toroot ?>training/index.html">Android Training</a></li> <li><a href="<?cs var:toroot ?>training/index.html">
<li><a href="<?cs var:toroot ?>guide/components/index.html">API Guides</a></li> <span class="en">Training</span>
<li><a href="<?cs var:toroot ?>reference/packages.html">Reference</a></li> <span class="zh-TW" style="display:none"></span>
<li><a href="<?cs var:toroot ?>tools/index.html">Tools</a> <span class="zh-CN" style="display:none"></span>
<span class="ru" style="display:none">Курсы</span>
<span class="ko" style="display:none"></span>
<span class="ja" style="display:none"></span>
<span class="es" style="display:none">Capacitación</span>
</a></li>
<li><a href="<?cs var:toroot ?>guide/components/index.html">
<span class="en">API Guides</span>
<span class="zh-TW" style="display:none">API </span>
<span class="zh-CN" style="display:none">API </span>
<span class="ru" style="display:none">Руководства по API</span>
<span class="ko" style="display:none">API </span>
<span class="ja" style="display:none">API </span>
<span class="es" style="display:none">Guías de la API</span>
</a></li>
<li><a href="<?cs var:toroot ?>reference/packages.html">
<span class="en">Reference</span>
<span class="zh-TW" style="display:none"></span>
<span class="zh-CN" style="display:none"></span>
<span class="ru" style="display:none">Справочник</span>
<span class="ko" style="display:none"></span>
<span class="ja" style="display:none"></span>
<span class="es" style="display:none">Referencia</span>
</a></li>
<li><a href="<?cs var:toroot ?>tools/index.html">
<span class="en">Tools</span>
<span class="zh-TW" style="display:none"></span>
<span class="zh-CN" style="display:none"></span>
<span class="ru" style="display:none">Инструменты</span>
<span class="ko" style="display:none"></span>
<span class="ja" style="display:none"></span>
<span class="es" style="display:none">Herramientas</span>
</a>
<ul><li><a href="<?cs var:toroot ?>sdk/index.html">Get the <ul><li><a href="<?cs var:toroot ?>sdk/index.html">Get the
SDK</a></li></ul> SDK</a></li></ul>
</li> </li>
@ -145,13 +201,45 @@ Distribution</a></li>
<div class="wrap"> <div class="wrap">
<ul class="nav-x col-9 develop" style="width:75%"> <ul class="nav-x col-9 develop" style="width:75%">
<li><a href="<?cs var:toroot ?>training/index.html" <?cs <li><a href="<?cs var:toroot ?>training/index.html" <?cs
if:training ?>class="selected"<?cs /if ?> >Android Training</a></li> if:training ?>class="selected"<?cs /if ?> >
<span class="en">Training</span>
<span class="zh-TW" style="display:none"></span>
<span class="zh-CN" style="display:none"></span>
<span class="ru" style="display:none">Курсы</span>
<span class="ko" style="display:none"></span>
<span class="ja" style="display:none"></span>
<span class="es" style="display:none">Capacitación</span>
</a></li>
<li><a href="<?cs var:toroot ?>guide/components/index.html" <?cs <li><a href="<?cs var:toroot ?>guide/components/index.html" <?cs
if:guide ?>class="selected"<?cs /if ?> >API Guides</a></li> if:guide ?>class="selected"<?cs /if ?> >
<span class="en">API Guides</span>
<span class="zh-TW" style="display:none">API </span>
<span class="zh-CN" style="display:none">API </span>
<span class="ru" style="display:none">Руководства по API</span>
<span class="ko" style="display:none">API </span>
<span class="ja" style="display:none">API </span>
<span class="es" style="display:none">Guías de la API</span>
</a></li>
<li><a href="<?cs var:toroot ?>reference/packages.html" <?cs <li><a href="<?cs var:toroot ?>reference/packages.html" <?cs
if:reference ?>class="selected"<?cs /if ?> >Reference</a></li> if:reference ?>class="selected"<?cs /if ?> >
<span class="en">Reference</span>
<span class="zh-TW" style="display:none"></span>
<span class="zh-CN" style="display:none"></span>
<span class="ru" style="display:none">Справочник</span>
<span class="ko" style="display:none"></span>
<span class="ja" style="display:none"></span>
<span class="es" style="display:none">Referencia</span>
</a></li>
<li><a href="<?cs var:toroot ?>tools/index.html" <?cs <li><a href="<?cs var:toroot ?>tools/index.html" <?cs
if:tools ?>class="selected"<?cs /if ?> >Tools</a></li> if:tools ?>class="selected"<?cs /if ?> >
<span class="en">Tools</span>
<span class="zh-TW" style="display:none"></span>
<span class="zh-CN" style="display:none"></span>
<span class="ru" style="display:none">Инструменты</span>
<span class="ko" style="display:none"></span>
<span class="ja" style="display:none"></span>
<span class="es" style="display:none">Herramientas</span>
</a></li>
</ul> </ul>
<!-- <a class="button-secondary download-sdk">Download the SDK</a> --> <!-- <a class="button-secondary download-sdk">Download the SDK</a> -->
</div> </div>

View file

@ -297,7 +297,12 @@ def:custom_left_nav() ?><?cs
call:about_nav() ?><?cs call:about_nav() ?><?cs
else ?><?cs else ?><?cs
call:default_left_nav() ?><?cs call:default_left_nav() ?><?cs
/if ?><?cs /if ?>
<script>
$(document).ready(function() {
changeDocLang(getLangPref());
});
</script><?cs
/def ?> /def ?>
<?cs # appears at the bottom of every page ?><?cs <?cs # appears at the bottom of every page ?><?cs

View file

@ -27,15 +27,63 @@
</div> </div>
<?cs if:training ?> <?cs if:training ?>
<div class="training-nav-top layout-content-col span-5" itemscope itemtype="http://schema.org/SiteNavigationElement"> <div class="training-nav-top layout-content-col span-5" itemscope itemtype="http://schema.org/SiteNavigationElement">
<a href="#" class="prev-page-link hide">Previous</a> <a href="#" class="prev-page-link hide">
<a href="#" class="next-page-link hide">Next</a> <span class="en">Previous</span>
<a href="#" class="start-class-link hide">Get started</a> <span class="zh-TW" style="display:none"></span>
<a href="#" class="start-course-link hide">First class</a> <span class="zh-CN" style="display:none"></span>
<span class="ru" style="display:none;font-size:85%">Предыдущий</span>
<span class="ko" style="display:none"></span>
<span class="ja" style="display:none"></span>
<span class="es" style="display:none">Anterior</span>
</a>
<a href="#" class="next-page-link hide">
<span class="en">Next</span>
<span class="zh-TW" style="display:none"></span>
<span class="zh-CN" style="display:none"></span>
<span class="ru" style="display:none;font-size:85%">Следующий</span>
<span class="ko" style="display:none"></span>
<span class="ja" style="display:none"></span>
<span class="es" style="display:none">Siguiente</span>
</a>
<a href="#" class="start-class-link hide">
<span class="en">Get started</span>
<span class="zh-TW" style="display:none"></span>
<span class="zh-CN" style="display:none"></span>
<span class="ru" style="display:none">Начало работы</span>
<span class="ko" style="display:none"></span>
<span class="ja" style="display:none"></span>
<span class="es" style="display:none">Empezar</span>
</a>
<a href="#" class="start-course-link hide">
<span class="en">First class</span>
<span class="zh-TW" style="display:none"></span>
<span class="zh-CN" style="display:none"></span>
<span class="ru" style="display:none">Первый урок</span>
<span class="ko" style="display:none"> </span>
<span class="ja" style="display:none"></span>
<span class="es" style="display:none">Primera clase</span>
</a>
</div> </div>
<?cs else ?> <?cs else ?>
<div class="paging-links layout-content-col span-4" itemscope itemtype="http://schema.org/SiteNavigationElement"> <div class="paging-links layout-content-col span-4" itemscope itemtype="http://schema.org/SiteNavigationElement">
<a href="#" class="prev-page-link hide">Previous</a> <a href="#" class="prev-page-link hide">
<a href="#" class="next-page-link hide">Next</a> <span class="en">Previous</span>
<span class="zh-TW" style="display:none"></span>
<span class="zh-CN" style="display:none"></span>
<span class="ru" style="display:none;font-size:85%">Предыдущий</span>
<span class="ko" style="display:none"></span>
<span class="ja" style="display:none"></span>
<span class="es" style="display:none">Anterior</span>
</a>
<a href="#" class="next-page-link hide">
<span class="en">Next</span>
<span class="zh-TW" style="display:none"></span>
<span class="zh-CN" style="display:none"></span>
<span class="ru" style="display:none;font-size:85%">Следующий</span>
<span class="ko" style="display:none"></span>
<span class="ja" style="display:none"></span>
<span class="es" style="display:none">Siguiente</span>
</a>
</div> </div>
<?cs /if ?><?cs # end if training ?> <?cs /if ?><?cs # end if training ?>
</div> </div>
@ -87,8 +135,24 @@
<?cs if:!fullscreen ?> <?cs if:!fullscreen ?>
<div class="paging-links layout-content-col col-4"> <div class="paging-links layout-content-col col-4">
<?cs if:(design||training||guide||walkthru) && !page.landing && !footer.hide ?> <?cs if:(design||training||guide||walkthru) && !page.landing && !footer.hide ?>
<a href="#" class="prev-page-link hide">Previous</a> <a href="#" class="prev-page-link hide">
<a href="#" class="next-page-link hide">Next</a> <span class="en">Previous</span>
<span class="zh-TW" style="display:none"></span>
<span class="zh-CN" style="display:none"></span>
<span class="ru" style="display:none;font-size:85%">Предыдущий</span>
<span class="ko" style="display:none"></span>
<span class="ja" style="display:none"></span>
<span class="es" style="display:none">Anterior</span>
</a>
<a href="#" class="next-page-link hide">
<span class="en">Next</span>
<span class="zh-TW" style="display:none"></span>
<span class="zh-CN" style="display:none"></span>
<span class="ru" style="display:none;font-size:85%">Следующий</span>
<span class="ko" style="display:none"></span>
<span class="ja" style="display:none"></span>
<span class="es" style="display:none">Siguiente</span>
</a>
<?cs /if ?> <?cs /if ?>
</div> </div>
<?cs /if ?> <?cs /if ?>