Форуми / Cotonti / Extensions / Content Internationalization (i18n) of Sienna

Trustmaster
#34494 01.06.2012 11:57

foxhound, i18n works in an absolutely different way in Siena rather than pagi18n plugin from Genoa. You don't need to create alternative cat trees, but rather translate the main one.

Here are the essential steps:

  1. Go to Administration / Configuration / Content Internationalization.
  2. Set there root categories where you want to apply i18n, e.g. "articles, news".
  3. Set there locales it will be translated into (the first locale is the main one): 
    en|English
    nl|Nederlands
    de|Deutsch
  4. Go to Administration / Structure / Pages / Structure Internationalization and translate category names and descriptions into each of your (non-main) locales.
  5. Add these controls to your page.tpl
    <!-- BEGIN: I18N_LANG -->
    {PHP.L.Language}:
    <ul>
    	<!-- BEGIN: I18N_LANG_ROW -->
    	<li><a href="{I18N_LANG_ROW_URL}">{I18N_LANG_ROW_TITLE}</a></li>
    	<!-- END: I18N_LANG_ROW -->
    </ul>
    <!-- END: I18N_LANG -->
    {PAGE_I18N_TRANSLATE} {PAGE_I18N_DELETE}
  6. Now if you open a page from one of the category trees you specified in 2) you can click "Translate" and translate into one of the other locales.
  7. If you need a language selector in your header.tpl, here is what it might look like:
    <!-- BEGIN: I18N_LANG -->
    <ul>
    	<!-- BEGIN: I18N_LANG_ROW -->
    	<li>
    		<a href="{I18N_LANG_ROW_URL}" title="{I18N_LANG_ROW_TITLE}"><img src="images/flags/{I18N_LANG_ROW_FLAG}.png" alt="{I18N_LANG_ROW_CODE}" /></a>
    	</li>
    	<!-- END: I18N_LANG_ROW -->
    </ul>
    <!-- END: I18N_LANG -->

That's it.

May the Source be with you!