1
noone
xlanguage module
  • 2006/12/18 18:00

  • noone

  • Just popping in

  • Posts: 53

  • Since: 2006/9/30


Hello,

I installed the xlanguage module in order to make my XOOPS site with three languages...

But I have a problem, after installing the xlanguage module I cant ( I dont know how) make three languages, I mean in the block I see only one flag, I am asking you how can I put more flags (more languages). And what should I do to make two or three languges...

I'm not sure I was clear...
I hope you understood what my problem is!!!

Thanks in advance

2
vaughan
Re: xlanguage module
  • 2006/12/18 18:04

  • vaughan

  • Friend of XOOPS

  • Posts: 680

  • Since: 2005/11/26


make sure you have download alternate language packs. XOOPS only comes with english language as default.

3
noone
Re: xlanguage module
  • 2006/12/18 18:14

  • noone

  • Just popping in

  • Posts: 53

  • Since: 2006/9/30


Thanks for your help...

There is something else I want to ask...
When I write somthing (text) ex. I post new news in the module News 1.44 how can What should I do to display the test I have wroten in both languages. ex: english and frech.

thanks

4
vaughan
Re: xlanguage module
  • 2006/12/18 18:17

  • vaughan

  • Friend of XOOPS

  • Posts: 680

  • Since: 2005/11/26


not sure, as i haven't used xlanguage or anything)

but i think you surround the text with [en][/en] for english and [fr][/fr] for french

i'm not sure on the [tags] though but they should be documented in the module readme files i think..

5
snow77
Re: xlanguage module
  • 2007/4/27 17:03

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


I followed these instructions from the readme inside the module and it's working good. Maybe there is a part of the instructions you might have skipped?


User guide
----------
1 install "xlanguage" as a regular module

2 insert one line into XOOPS/include/common.php

include_once XOOPS_ROOT_PATH.'/modules/xlanguage/api.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.php, take "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 language) from module admin page for instance, to make language switch between: English, Simplified Chinese (gb2312), Traditional Chinese (big5) and UTF-8 Chinese:
base 1: name: english; description(optional): English; charset: iso-8859-1; code: en (or anyother like "xen", not a true language code, just the tag for indicating English content)
base 2: name: schinese; description(optional): Simplified Chinese; charset: gb2312; code: zh (or anyother like "sc", not a true language code, just the tag for indicating Chinese content)
extended lang of schinese 1: name: tchinese; description(optional): Traditional Chinese; charset: big5 code: zh-TW (the true language code of Traditional Chinese) base: schinese
extended lang of schinese 2: name: utf8; description(optional): Simplified Chinese UTF-8; charset: utf-8 code: zh-CN (the true language code of Simplified Chinese) base: schinese

5 make the block "langauge selection" visible

6 add multilingual content with according tags sepcified for each base language (in step 4) to your modules, templates 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 content, you 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 are: English-en; French-fr; SimplifiedChiense-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]
www.polymorphee.com
www.xoopsdesign.com

6
snow77
Re: xlanguage module
  • 2007/4/27 17:55

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


the way david says is for when you want the same language appear the same for the different set of tags you have grouped:

[en|fr]hello[/en|fr]
will display "hello" when english and french are selected

This way shows a separate language for each language selection.:

[en]hello[/en] [es]hola[/es] [fr]bonjour[/fr] [pt_br]olá[/pt_br]
www.polymorphee.com
www.xoopsdesign.com

Login

Who's Online

280 user(s) are online (173 user(s) are browsing Support Forums)


Members: 0


Guests: 280


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits