Michael Posted January 3, 2006 Share Posted January 3, 2006 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. :) Link to comment Share on other sites More sharing options...
Antony Posted January 4, 2006 Share Posted January 4, 2006 The latter format is better. Perhaps on the next point release the upgrader could convert all files over? Link to comment Share on other sites More sharing options...
Michael Posted January 4, 2006 Share Posted January 4, 2006 Yeah, personally I don't care which format they do pick, I'd just like it to be one or the other instead of having both floating around out there. Link to comment Share on other sites More sharing options...
Shawn Dean Posted January 4, 2006 Share Posted January 4, 2006 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; Link to comment Share on other sites More sharing options...
Michael Posted May 23, 2006 Share Posted May 23, 2006 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 Link to comment Share on other sites More sharing options...
Shawn Dean Posted May 23, 2006 Share Posted May 23, 2006 Hence... use the API Language. ;) Link to comment Share on other sites More sharing options...
Logan Posted May 24, 2006 Share Posted May 24, 2006 They're standardized :), see here: http://forums.invisionpower.com/index.php?...14&bug_cat_id=3 The 'official' format is: 'somekey' => 'some text'; Link to comment Share on other sites More sharing options...
bfarber Posted May 24, 2006 Share Posted May 24, 2006 They're standardized :) , see here: http://forums.invisionpower.com/index.php?...14&bug_cat_id=3 The 'official' format is: 'somekey' => 'some text'; Actually it's 'somekey' => 'sometext', (Note the comma, instead of the semicolon) :P Link to comment Share on other sites More sharing options...
Michael Posted May 24, 2006 Share Posted May 24, 2006 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! Link to comment Share on other sites More sharing options...
Logan Posted May 24, 2006 Share Posted May 24, 2006 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 Link to comment Share on other sites More sharing options...
Mark Posted May 25, 2006 Share Posted May 25, 2006 Even I knew that ;) Link to comment Share on other sites More sharing options...
bfarber Posted May 25, 2006 Share Posted May 25, 2006 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. :) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.