Organize Language Files

Tools by the phpBBModders team and Community contributed tools.
Forum rules
Only post tools related to modding in here, simple.
Post Reply
User avatar
EXreaction
New member
New member
Posts: 11
Joined: 19 Jul 2008, 16:33
Real name: Nathan
Contact:

Organize Language Files

Post by EXreaction »

This script organizes all of the language keys in a file (and can also do so for all language files in a certain directory and subdirectories).

The file is attached, just unzip it and upload it to your forum's root directory.

The file name of the file you want to organize should be sent in the URL.

If you want to organize the language/en/common.php file it would be:
organize_lang.php?file=en/common
(do not add .php)

If you want to organize the entire language/en/acp/ folder it would be:
organize_lang.php?file=en/acp/

By default, if no file is submitted in the URL it organizes the files in the language/en/mods/ directory.
Attachments
organize_lang.zip
(2.02 KiB) Downloaded 214 times
BetaDevil
Supporter
Supporter
Posts: 27
Joined: 01 Sep 2007, 12:27
Real name: Tim

Re: Organize Language Files

Post by BetaDevil »

Yeah, it works great :D Now I don't have too organize it by myself :mrgreen:
User avatar
Obsidian
Supporter
Supporter
Posts: 736
Joined: 13 May 2008, 15:20
Real name: Damian
Contact:

Re: Organize Language Files

Post by Obsidian »

So, I take it that it does it alphabetically, then? :)
User avatar
EXreaction
New member
New member
Posts: 11
Joined: 19 Jul 2008, 16:33
Real name: Nathan
Contact:

Re: Organize Language Files

Post by EXreaction »

Yes, it looks like this when ran:
http://userblogmod.googlecode.com/svn/t ... common.php

(download it and look at it, browsers don't keep the spacing correct)
igorw
Past Contributor
Past Contributor
Posts: 1967
Joined: 01 Jun 2006, 20:48
Real name: Igor

Re: Organize Language Files

Post by igorw »

Very nice! I think i'll be using this. :D
femu
New member
New member
Posts: 19
Joined: 26 Jul 2006, 08:08
Location: Pfaffenhofen
Contact:

Re: Organize Language Files

Post by femu »

Respect! Great tool and helps to get the language strings in a clean order!

Thanks!
Kind regards,
femu
femu
New member
New member
Posts: 19
Joined: 26 Jul 2006, 08:08
Location: Pfaffenhofen
Contact:

Re: Organize Language Files

Post by femu »

Hi,

small question. I get with one file:

Code: Select all

Please make sure you are using UNIX line endings.


I edit all files with Notepad++ and don't have this with other files. Any idea, what I need to do?

EDIT: Ok. Found it. Was not the line ending stuff, but a space after the array:

So it was:

Code: Select all

$lang = array_merge($lang, array (


instead of

Code: Select all

$lang = array_merge($lang, array(
Kind regards,
femu
Post Reply