1
fblanchet
Change Language with OsCommerce
  • 2006/7/27 22:46

  • fblanchet

  • Just popping in

  • Posts: 18

  • Since: 2005/6/14


Does anyone know how to change language under OSCommerce?

I use Marcan's SmartLanguage, and i wish to be able to change language from my main menu.

At the moment, it remains the english file when i try to select another language. (I downloaded and installed the french translations from OsCommerce Contribution site).

Thanks for your help.

2
akbarsal
Re: Change Language with OsCommerce
  • 2006/7/27 23:36

  • akbarsal

  • Just popping in

  • Posts: 9

  • Since: 2006/7/27


I'm using osC 0.68 . What I did was use xlangguage module. and change every langguage inside "module/osC/includes" , because if its inside "module/osC/langguage" it will detect it.
(change every langguage english other than "module/osC/lannguage"). How ....???

example:

define('NAVBAR_TITLE', 'My Account');

to

define('NAVBAR_TITLE', '[en]My Account[/en][id]Account Ku[/id]');

This is the useguide from xlangguage.
User guide
----------
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 add basic langauges (from an available language list) and extended languages(of a selected basic language) from module admin page
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)
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)

4 make the block "langauge selection" visible

5 add multilingual content with according tags sepcified for each base language (in step 3) [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 3:
[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 3 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]

6 automatic conversion of content from one charset(extended language) to another [Actually on action needed in this step]

3
fblanchet
Re: Change Language with OsCommerce
  • 2006/7/28 11:11

  • fblanchet

  • Just popping in

  • Posts: 18

  • Since: 2005/6/14


I'm currently using Marcan's SmartLanguage module... Is there any problems using Xlanguage above that?

Thanks for the detailed information akbarsal!

Fred

4
akbarsal
Re: Change Language with OsCommerce
  • 2006/7/28 23:20

  • akbarsal

  • Just popping in

  • Posts: 9

  • Since: 2006/7/27


well I'm using

xoops 2.2.4 with osC 0.68 on
window apache 2
PHP Version 4.4.1
MySQL Version 4.1.16-nt

the problem is actually minor, look at

https://xoops.org/modules/newbb/viewtopic.php?forum=28&topic_id=51836

Login

Who's Online

216 user(s) are online (141 user(s) are browsing Support Forums)


Members: 0


Guests: 216


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