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.
Organize Language Files
Forum rules
Only post tools related to modding in here, simple.
Only post tools related to modding in here, simple.
- EXreaction
- New member
- Posts: 11
- Joined: 19 Jul 2008, 16:33
- Real name: Nathan
- Contact:
Organize Language Files
- Attachments
-
- organize_lang.zip
- (2.02 KiB) Downloaded 214 times
Re: Organize Language Files
Yeah, it works great Now I don't have too organize it by myself
Re: Organize Language Files
So, I take it that it does it alphabetically, then?
- EXreaction
- New member
- Posts: 11
- Joined: 19 Jul 2008, 16:33
- Real name: Nathan
- Contact:
Re: Organize Language Files
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)
http://userblogmod.googlecode.com/svn/t ... common.php
(download it and look at it, browsers don't keep the spacing correct)
Re: Organize Language Files
Very nice! I think i'll be using this.
Donate to phpBBModders.net - we're poor!
Re: Organize Language Files
Respect! Great tool and helps to get the language strings in a clean order!
Thanks!
Thanks!
Kind regards,
femu
femu
Re: Organize Language Files
Hi,
small question. I get with one file:
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:
instead of
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
femu