Jump to content

Standardize the Language File formats


Guest Michael

Recommended Posts

Posted

As a modder who always tries to put my on-screen text into language files, I am often told that my mod's instructions for the language file edits cannot be done because they can't find this code in their language files:

<?php


$lang = array (

'blah'  => "blah",

Instead, their language files look like this at the top:

<?php



$lang['blah']  = "blah";


The first code above is the default file structure as IPB comes out-of-the-box. The second code is how some language packs will be formatted, and how the files will look if the languages are edited through the ACP or through the language API system.

So my suggestion is to pick one of these formats or the other, and use it everywhere, instead of there being two different formats floating out there. :)

Posted

I agree... I prefer the 2nd one where all keys & values are stored into 1 main array() tag and not $lang['key'] = $var;

I agree... I prefer the 2nd one where all keys & values are stored into 1 main array() tag and not $lang['key'] = $var;

  • 4 months later...
Posted

Any chance of this being looked into for IPB 2.2? It would be a very big benefit to the modding community, so that we could always have one language file structure to deal with. Pretty please? :D

Posted

Will the language API or editing the language entries via the ACP change the structure to the other format then, or is it going to keep that format? My issue is that these should not radically alter the language files, people who don't understand these two formats will continue to ask about this if they get their language files changed on them.

EDIT: Just read in the bug report that yes, they should remain in the same format. That should make for at least one happy modder!

Posted

Actually it's



'somekey' => 'sometext',




(Note the comma, instead of the semicolon) :P


Woops, I knew that. For some reason I must of thought it was a variable instead of an array key hence the semicolon :P
Posted

Yes, really the only change was that writing the files from the ACP during edit or import, or writing the files from the API, will write them in the format I listed above. :)

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...