MyXoops Forum

Forum - myXOOPS German Support

2 + 3 = ?  
Geben Sie das Ergebnis der Berechnung ein
Sie haben max. 10 Versuche.
 
* = Erforderlich

Re: xlanguage

Betreff: Re: xlanguage
von Zwasli am 12.11.2006 16:29:57

sind sie alle vorhanden...

aber in der readmy datei steht da etwas das ich etwas einfügen muss:
1 install "xlanguage" as a regular module

2 insert one line
   
include_once XOOPS_ROOT_PATH.'/modules/xlanguage/api.php';
  
into XOOPS/include/common.php 
  RIGHT BEFORE 
     
// #################### Include site-wide lang file ##################
      
if ( file_exists(XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/global.php") ) {
         include_once 
XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/global.php";
     } else {
          include_once 
XOOPS_ROOT_PATH."/language/english/global.php";
      }
 
3 modify language/LocalLanguage/global.phptake "schinese" as example
  
//%%%%%   LANGUAGE SPECIFIC SETTINGS   %%%%%
  //define('_CHARSET', 'GB2312');
 //define('_LANGCODE', 'zh-CN');
 
define('_CHARSET', empty($xlanguage["charset"])?'GB2312':$xlanguage["charset"]);
  
define('_LANGCODE', empty($xlanguage["code"])?'zh-CN':$xlanguage["code"]);
  
$xlanguage['charset_base'] = "gb2312";
     
4 select basic langauges (from an available language list) and add extended languages (upon a selected basic languagefrom module admin page
  
for instanceto make language switch betweenEnglishSimplified Chinese (gb2312), Traditional Chinese (big5) and UTF-8 Chinese:
  
base 1:   nameenglish;    description(optional): English;       charsetiso-8859-1;  codeen (or anyother like "xen"not a true language codejust the tag for indicating English content)
  
base 2:   nameschinese;   description(optional): Simplified Chinese;  charsetgb2312;    codezh (or anyother like "sc"not a true language codejust the tag for indicating Chinese content)
 
extended lang of schinese 1nametchinese;  description(optional): Traditional Chinese;     charsetbig5   codezh-TW (the true language code of Traditional Chinese)   baseschinese
  extended lang of schinese 2
nameutf8;    description(optional): Simplified Chinese UTF-8;  charsetutf-8  codezh-CN (the true language code of Simplified Chinese)    baseschinese

5 make the block 
"langauge selection" visible

6 add multilingual content with according tags sepcified 
for each base language (in step 4to your modulestemplates or themes[Skip this step if you do not use multi-language content display but only use charset encoding]: 
  
wrap content of each language with respective tag specified in step 4:
  [
langcode1]Content of the language1[/langcode1] [langcode2]Content of the language2[/langcode2] [langcode3]Content of the language3[/langcode3] ...
 if 
two or more languages have same contentyou do not need add them one by one but use delimiter "|":  
  [
langcode1|langcode2]Content shared by language1&2[/langcode1|langcode2] [langcode3]Content of the language3[/langcode3] ...
  
a true example (suppose the lang_codes specified in step 4 areEnglish-enFrench-frSimplifiedChiense-sc):
 [
en]My XOOPS[/en][fr]Moi XOOPS[/fr][sc]ÎÒµÄXOOPS[/sc]
 OR:
 [
english|french]This is my content in English and French[/english|french][schinese]ÖÐÎÄÄÚÈÝ[/schinese]

7 automatic conversion of content from one charset(extended languageto another [Actually on action needed in this step]

8 __if__ you would like to insert hardcoded scripts for language switch in your theme or any template besides the language selection box:
  
1modify /modules/xlanguage/api.php "$xlanguage_theme_enable = true;"
  
2config options "$options = array("images", " ", 5); // display mode, delimitor, number per line";
  
3insert "<{$smarty.const.XLANGUAGE_SWITCH_CODE}>" into your theme or template files anywhere you prefer it present

nur kapiere ich irgend wie nichts....

Greez

Aktuell aus dem Forum

Forum Thema Antworten Views Letzter Beitrag
Modulentwicklung New Xoops Xcreate Module 0 5324 26.11.2025 15:22
efkan Gehe zum letzten Beitrag
Modulentwicklung XOOPS Custom Field Module 1 1813 24.11.2025 11:21
Goffy Gehe zum letzten Beitrag