Advertisement:

Author Topic: [OK] Auto install mods in all available languages  (Read 4590 times)

Offline $p00ky

  • Semi-Newbie
  • *
  • Posts: 35
  • EroGaKi PoWa
    • EroGaKi-Team
[OK] Auto install mods in all available languages
« on: February 04, 2009, 11:32:36 PM »
Hello dear community,

Is there a way to install a mod in all available languages, using the english version as default if a specific translation is not included in the mod?

I mean, so far, I always copy the xxx.english.php into xxx.other_language.php, add this file in the package-info.xml for extracting, and copy language instructions in install.xml.

Is there a way to do it automatically so I don't need to edit manually the mods?

Thanks in advance.

$p00ky.
« Last Edit: February 05, 2009, 09:48:33 AM by $p00ky »
$p00ky @ EroGaKi

Offline Charles Hill

  • Sophist Member
  • *****
  • Posts: 1,006
  • Gender: Male
  • question everything
Re: Auto install mods in all available languages
« Reply #1 on: February 05, 2009, 12:01:51 AM »
All you need to have is a language file for the fall-back / default language set for your forum (usually english).  If the appropriate language file for a user (french for example) isn't found, then it automatically tries to find the fall-back / default version of the language file.

Offline $p00ky

  • Semi-Newbie
  • *
  • Posts: 35
  • EroGaKi PoWa
    • EroGaKi-Team
Re: Auto install mods in all available languages
« Reply #2 on: February 05, 2009, 05:46:57 AM »
Mmm, I don't get it.

For example right now, the default language for the forum is French, and there is also Deutsch, Spanish, Italian, and still English.
When I install mods, it only install language files for the english version, so I cannot access to the administration (nor view the effects) on other languages.

Even if the languages are recognized in the "Languages" section in the admin pannel.
$p00ky @ EroGaKi

Offline karlbenson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,630
  • Gender: Male
    • Lifeproof
Re: Auto install mods in all available languages
« Reply #3 on: February 05, 2009, 07:26:22 AM »
If mod doesn't support your language you need to copy across the language strings.

IIRC there was also some changes in smf 2.x rc1, that if the language file wasn't present, it loads english instead.

I'm not sure whether that affects single language strings, or just a whole file like Login.english.php

Offline $p00ky

  • Semi-Newbie
  • *
  • Posts: 35
  • EroGaKi PoWa
    • EroGaKi-Team
Re: Auto install mods in all available languages
« Reply #4 on: February 05, 2009, 09:48:17 AM »

OK, I see, thank you.

So I keep editing necessary files to get mods for all languages...
$p00ky @ EroGaKi

Offline Charles Hill

  • Sophist Member
  • *****
  • Posts: 1,006
  • Gender: Male
  • question everything
Re: [OK] Auto install mods in all available languages
« Reply #5 on: February 05, 2009, 12:27:35 PM »
Ya it only works if you're missing whole language files, not specific $txt variables within language files.