Skilled Illusionist
- Joined
- Oct 28, 2008
- Messages
- 379
- Reaction score
- 47
I know I haven't made a guide in a long time so here is one
Ok, for example you go to the page list of moons (in the admin panel). You'll see that most of the text (not to say everything) is in french. Even though you have an english language pack. That's frustrating i know. So here is a guide how to fix it!!
Ok, first you look for 3 files, first you look for the template (in this example moonlist_body.tpl.
You will see a uncomplete HTML file. There is text in these files, this text is not from the language files.
So how do we link this text to the language files?
Therefor you also open php file (wich is located in ./ or ./admin/)
In this example that's moonlist.php
Ok now we've opened this file you'll look for a function
This line includes the language file overview. So we're going to open that language file (./language/en/overview.mo)
Ok Now the real thing starts.
Put your 3 notepad windows next to each other.
Replace the text in the template file between the tags (<h2>...</h2>)
by short explainations of what stands there. (i know sounds weird but it gets clear when i'll show you)
So we'll end up by something like this
NOTE: the lm_ is a abbreviation for list of moon, always use a short letter code, this to prevent that you overwrite older language codes ({language_code})
Don't replace all text at the same time, you still need to remember wich was the original text.
Now open your language file and scroll to the bottom.
Now at a line like this
the language code that you've previous entred in the template files comes here back ($lang['language_code']).
Keep doing this with all the text in the template files and you soon have a clean 1 language game.
If you're bad @ french i should recommend
[----------------------------------------------------------------
Ok now i'll show you how to change the time indicator at the overview page. Even if you've changed all the template files there still be a french sentence up there. Ok now this can only be changed to 1 language (multi language isn't possible now).
Ok this aint that hard.
Open the file time.js in ./scripts
On line 26 you have something like this (i have already translated it into english
Change the text and you're done
NOTE:If you've edited it wont imidiatly be updated, this due the usage of cookies, delete your cookies or wait 2 days or so.
Any questions reply here.
Greetz Aropop
Ok, for example you go to the page list of moons (in the admin panel). You'll see that most of the text (not to say everything) is in french. Even though you have an english language pack. That's frustrating i know. So here is a guide how to fix it!!
Ok, first you look for 3 files, first you look for the template (in this example moonlist_body.tpl.
You will see a uncomplete HTML file. There is text in these files, this text is not from the language files.
So how do we link this text to the language files?
Therefor you also open php file (wich is located in ./ or ./admin/)
In this example that's moonlist.php
Ok now we've opened this file you'll look for a function
PHP:
includeLang('overview');
Ok Now the real thing starts.
Put your 3 notepad windows next to each other.
Replace the text in the template file between the tags (<h2>...</h2>)
by short explainations of what stands there. (i know sounds weird but it gets clear when i'll show you)
So we'll end up by something like this
Code:
<h2>{lm_list_moons}</h2>
<table width="500" style="color:#FFFFFF">
<tr>
<td class="c" colspan="6">{lm_moon_univers</td>
</tr>
<tr>
<th>{lm_id}</th>
<th>{lm_name}</th>
Don't replace all text at the same time, you still need to remember wich was the original text.
Now open your language file and scroll to the bottom.
Now at a line like this
PHP:
$lang['lm_moon_list'] = "List of moons";
Keep doing this with all the text in the template files and you soon have a clean 1 language game.
If you're bad @ french i should recommend
You must be registered to see links
![----------------------------------------------------------------
Ok now i'll show you how to change the time indicator at the overview page. Even if you've changed all the template files there still be a french sentence up there. Ok now this can only be changed to 1 language (multi language isn't possible now).
Ok this aint that hard.
Open the file time.js in ./scripts
On line 26 you have something like this (i have already translated it into english
Code:
total = "It's the " + DinaDate + " and it's " + DinaHeure + ".";
NOTE:If you've edited it wont imidiatly be updated, this due the usage of cookies, delete your cookies or wait 2 days or so.
Any questions reply here.
Greetz Aropop
Last edited: