1
achz04
Change Language
  • 2010/6/16 9:19

  • achz04

  • Just popping in

  • Posts: 14

  • Since: 2010/6/15


Hi guys,

Can someone tell me the easiest way to let user choose language on my site.. In my opinion it must be something to do with the language folder... maybe create new language folder for my language and do something with the code but i have no idea how to do that..

Thanks in advance

2
culex
Re: Change Language
  • 2010/6/16 9:55

  • culex

  • Module Developer

  • Posts: 711

  • Since: 2004/9/23


The easiest way is to use a multilanguage module. I have always used xlanguage

This mean all content can be placed in language tags [ en ] for english etc what ever you set it up to be. And users then choose the content they need english language, german language from a block in the frontpage showing small letters or flag symbols
Programming is like sex:
One mistake and you have to support it for the rest of your life.

3
Burning
Re: Change Language
  • 2010/6/16 10:10

  • Burning

  • Theme Designer

  • Posts: 1163

  • Since: 2006/8/22


hi'

There are at least two methods :
• Google translate tool (Google translator)
xLanguage module (clic on Download button for lastest version, 3.02)


To install xLanguage :


• 1. install xlanguage module


• 2. modify 1 file into xoops core, include/common.php

Before (around line 152):
/**
 * User Sessions
 */


Copy this lines :
include_once XOOPS_ROOT_PATH'/modules/xlanguage/api.php';
// #################### Include site-wide lang file ##################
if ( !@include_once XOOPS_ROOT_PATH "/language/" $xoopsConfig['language'] . "/global.php" ) {
   include_once 
XOOPS_ROOT_PATH "/language/english/global.php";
 }


(I believe it is necessary, if someone has a bette method ... )


• 3. go to xLanguage back office and configure your languages. Exemple of table :
Resized Image



• 4. Create config file (link under table). It will create a manguage configuration file in xoops_data/caches/xoops_cache


So, module should be ready to use. You have to enter manually all your translations. Example :
[en]english text[/en][fr]french text[/fr]
Still learning CSS and... english

4
ghia
Re: Change Language
  • 2010/6/16 10:16

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Quote:
• 2. modify 1 file into xoops core, include/common.php
This is no longer needed from XOOPS 2.4.4 and xLanguage 3.02. It is done automatic by the preload.

5
Burning
Re: Change Language
  • 2010/6/16 10:19

  • Burning

  • Theme Designer

  • Posts: 1163

  • Since: 2006/8/22


Thanks Ghia, I was not sure :) !

More clear now.
Still learning CSS and... english

6
achz04
Re: Change Language
  • 2010/6/16 16:38

  • achz04

  • Just popping in

  • Posts: 14

  • Since: 2010/6/15


Thanks for the help guys.. been trying xlanguage for a while now.. so far so good.. ^^

Login

Who's Online

161 user(s) are online (113 user(s) are browsing Support Forums)


Members: 0


Guests: 161


more...

Donat-O-Meter

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

Latest GitHub Commits