Differences

This shows you the differences between two versions of the page.

english:phpwcms-system:admin:site-structure:multilingual [2009/09/12 09:05]
Knut Heermann (flip-flop)
english:phpwcms-system:admin:site-structure:multilingual [2018/06/03 18:09] (current)
Line 2: Line 2:
====== Multilingual/Multidomain ====== ====== Multilingual/Multidomain ======
-** 
-How can I create a multilingual site?**  
-- Basics :Level and IDs +**How can I create a multilingual site?**  
-- Navigation + 
-- Switch for different domains+  * For every langauge we need an own category tree.  
 +  * Every language has its own template with links //(switches)//  to the other language tree.  
 +  * The navigation simply begins at the first ID of the language root category.  
 + 
 +---- 
 +\\
Version: V1.2.7 - 1.x.x Version: V1.2.7 - 1.x.x
Line 14: Line 17:
-===== Basics: Level and IDs with a multilingual switch =====+===== Basics: Level and IDs for a multilingual site =====
-E.g.: An example unsing the two languages english [en] and german [de] (IDs are coincidentally selected)+An example using the two languages english [en] and german [de] //(IDs are coincidentally selected)//.
<file> <file>
Line 53: Line 56:
</file> </file>
-Level based: The level is relatively addressed. We need this for a right navigation. \\+**Level based:** The level is relatively addressed by using a divided navigation, (e.g. horizontal and vertical). More see "Level-Lift" at the bottom. \\
-Every language has its own category trees //(ADMIN -> site structure)//.  +Every language [en] & [de] has its own category trees //(ADMIN -> site structure)//.  
-And every language [en] / [de] has its own template.+And every language [en] & [de] has its own template.
-<note> +<note important
-Please create the templates first. +**Please create the templates first** :!:  
 + 
 +\\ 
 +It turned out as meaningful to finish the side in one language and then copy then the complete language tree for the use of other languages. Afterwards the languagespecific category title and alias name are given to the copied categories.
</note> </note>
 +~~UP~~
===== Template: Language switch ===== ===== Template: Language switch =====
Line 68: Line 75:
We need two links in every template for a switch to the other language. We need two links in every template for a switch to the other language.
-In this example I uses little flag images 23pxx15px.+**Simple version:** 
 +<code html> 
 +<!-- ===== Language-Switch [en] //--> 
 +<div id="language_switch"> 
 +  <a href="index.php?de" target="_self">Switch to german</a> | english active 
 +</div> 
 +<!-- ===== End Language-Switch //--> 
 +</code> 
 + 
 +<code html> 
 +<!-- ===== Language-Switch [de] //--> 
 +<div id="language_switch"> 
 +  Deutsch aktiv | <a href="index.php?en" target="_self">umschalten nach Englisch</a> 
 +</div> 
 +<!-- ===== End Language-Switch //--> 
 +</code> 
 + 
 +\\ 
 + 
 + 
 +In this example I use little flag images 23x15px //(CSS inserted)//.
In your [en] template please insert e.g.: In your [en] template please insert e.g.:
-<code html>+<code html|h language switch [en] |h>
<!-- ===== Language switch //--> <!-- ===== Language switch //-->
<div id="language_switch"> <div id="language_switch">
-<div id="flag_de"><a href="index.php?de" target="_self"><img src="img/leer.gif" border="0" vspace="0" hspace="0" alt="german" width="23" height="15" title="switch to german" /></a></div> +  <div id="flag_de"> 
- +    <a href="index.php?de" target="_self"><img src="img/leer.gif" border="0" vspace="0" hspace="0" alt="german" width="23" height="15" title="switch to german" /></a> 
-<div id="flag_en_act"><a href="index.php?en" target="_self"><img src="img/leer.gif" border="0" vspace="0" hspace="0" alt="english" width="23" height="15" title="enlish active" /></a></div>+  </div> 
 +  <div id="flag_en_act"> 
 +    <a href="index.php?en" target="_self"><img src="img/leer.gif" border="0" vspace="0" hspace="0" alt="english" width="23" height="15" title="enlish active" /></a> 
 +  </div>
</div> </div>
-<!-- ===== End Language switch //-->+<!-- ===== End Language switch [en] //-->
</code> </code>
In your [de] template please insert e.g.: In your [de] template please insert e.g.:
-<code html>+<code html|h language switch [de] |h>
<!-- ===== Language switch [de] //--> <!-- ===== Language switch [de] //-->
<div id="language_switch"> <div id="language_switch">
-<div id="flag_de_act"><a href="index.php?de" target="_self"><img src="img/leer.gif" border="0" vspace="0" hspace="0" alt="deutsch" width="23" height="15" title="Deutsch aktiv" /></a></div> +  <div id="flag_de_act"> 
- +    <a href="index.php?de" target="_self"><img src="img/leer.gif" border="0" vspace="0" hspace="0" alt="deutsch" width="23" height="15" title="Deutsch aktiv" /></a> 
-<div id="flag_en"><a href="index.php?en" target="_self"><img src="img/leer.gif" border="0" vspace="0" hspace="0" alt="englisch" width="23" height="15" title="umschalten nach Englisch" /></a></div>+  </div> 
 +  <div id="flag_en"> 
 +    <a href="index.php?en" target="_self"><img src="img/leer.gif" border="0" vspace="0" hspace="0" alt="englisch" width="23" height="15" title="umschalten nach Englisch" /></a> 
 +  </div>
</div> </div>
<!-- ===== End Language switch [de] //--> <!-- ===== End Language switch [de] //-->
Line 95: Line 128:
-\\+~~UP~~
Line 102: Line 135:
-A simple navigation at the right/left using the navigation tag **{NAV_LIST_UL:F ........** +A simple verticle navigation at the right/left using the navigation tag **{NAV_LIST_UL:F ........**
-- NAV_LIST_UL V1.3x+
  * **en:** {NAV_LIST_UL:F,**01**,,act_path,active,,,}   * **en:** {NAV_LIST_UL:F,**01**,,act_path,active,,,}
Line 127: Line 159:
(one level deep). (one level deep).
-E.g. the vertical sub output for an active ##en_category_02##+E.g. the vertical sub output for an active **en_category_02** using the [[english:navigation:little-helper:level-lift|Level-Lift]]. 
 + 
 +##[en_category_01] **[en_category_02]** [en_category_03] [en_category_04]##
<file> <file>
Line 140: Line 174:
Please copy this snippet into every language template. Please copy this snippet into every language template.
You can lift an ID based navigation to an level based navigation. \\ You can lift an ID based navigation to an level based navigation. \\
-I called it level lift. (Have a look too  - [[english/navigation/nav_list_ul|NAV_LIST_UL (CSS)]] at the end.+I called it [[english:navigation:little-helper:level-lift|Level-Lift]]. (Have a look too  - [[english:navigation:nav_list_ul|NAV_LIST_UL (CSS)]] at the end.
Line 155: Line 189:
Where LEVEL_ID'[**X**] is the level. Where LEVEL_ID'[**X**] is the level.
 +
 +~~UP~~
\\ \\
Line 161: Line 197:
-===================================================== +**You only need this switch if every language has its own domain.** :!:
-forum: [[http://www.phpwcms.de/forum/viewtopic.php?p=73725#73725]]+
-There is a switch working with two domains mydomain1.com and mydomain2.com generating an HTTP Status Code:+ 
 +Forum: [[http://www.phpwcms.de/forum/viewtopic.php?p=73725#73725]] 
 + 
 +There is a switch working with two domains **mydomain1.com** and **mydomain2.com** generating an HTTP Status Code: \\
##HTTP Status Code: HTTP/1.1 301 Moved Permanently## ##HTTP Status Code: HTTP/1.1 301 Moved Permanently##
Line 172: Line 210:
Please use only this entry in config: \\ Please use only this entry in config: \\
<code>$phpwcms['site'] = 'http://'.$_SERVER['SERVER_NAME'].'/';</code> \\ <code>$phpwcms['site'] = 'http://'.$_SERVER['SERVER_NAME'].'/';</code> \\
-$_SERVER['SERVER_NAME'] should always contain the current called Domain+**$_SERVER['SERVER_NAME']** should always contain the current called Domain.
- +
-With LEVEL_ID[1] you always know the starting level ID for the menus.+
</note> </note>
Line 183: Line 219:
  * $phpwcms['allow_ext_init']  = 1;   * $phpwcms['allow_ext_init']  = 1;
 +\\
 +
 +**Your Domains- and starting alias names you must be registered in the script.** \\
 +//(A short version of this script you will find in: /template/inc_Script/frontend_init/disabled/domaincheck.php).//
<code php|h rt_domainswitch.php |h> <code php|h rt_domainswitch.php |h>
<?php <?php
english/phpwcms-system/admin/site-structure/multilingual.1252739148.txt.gz · Last modified: 2018/06/03 18:07 (external edit)
www.planmatrix.de www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0