1
andersa
Fall back to english translation when default translation isn't available.
  • 2004/6/6 8:21

  • andersa

  • Just popping in

  • Posts: 45

  • Since: 2004/5/27


When doing translation to danish it has been a bit of an annoyance that when you add a new module you have to clone the translation first before you can really configure the module or else the module text will not be inserted.

If XOOPS fell back to the english, this would not be a problem.

2
Herko
Re: Fall back to english translation when default translation isn't available.
  • 2004/6/6 10:25

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


Many modules already do this: the system module for instance has this code to do this:

if (file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php")) {
include 
XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php";
} elseif (
file_exists(XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php")) {
include 
XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php";
}


Make sure the modules you are working with do this as well...

Herko

3
andersa
Re: Fall back to english translation when default translation isn't available.
  • 2004/6/6 10:34

  • andersa

  • Just popping in

  • Posts: 45

  • Since: 2004/5/27


I am using 2.0.6 and maybe I am not implementing the translation correctly, but all the system modules I have tried so far require the default translation folders to be present. In other words if you select a language other than danish for instance, if the language folder for danish language and the matching files are not present, then I just get the variable name inserted instead of the english text.

Login

Who's Online

431 user(s) are online (315 user(s) are browsing Support Forums)


Members: 0


Guests: 431


more...

Donat-O-Meter

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

Latest GitHub Commits