Posted: Fri Apr 22, 2005 6:27 am
The way we've done it in Blacknova Traders is by doing language strings.
So, for example, to display:
"Planetary beams have destroyed X points of armor"
we do:
Then we run a str_replace on [cmb_planetbeams], replacing it with the points of armor destroyed.
In other languages, it looks like:
That way, you get the full context of the sentence, you get full language translation, and you also get the values you need.
As a result, we have a collection of files that are just that - a collection of variable/text assignments, and we only include a few lang files per gamecode file, reducing the memory overhead. It also helps translators, because they have managable sized files to work with.
So, for example, to display:
"Planetary beams have destroyed X points of armor"
we do:
Code: Select all
$l_cmb_destroyedyourarmor = 'Planetary beams have destroyed їcmb_planetbeams] points of armor';In other languages, it looks like:
Code: Select all
$l_cmb_destroyedyourarmor = "e;Los láseres planetarios destruyeron їcmb_planetbeams] puntos de blindaje"e;;As a result, we have a collection of files that are just that - a collection of variable/text assignments, and we only include a few lang files per gamecode file, reducing the memory overhead. It also helps translators, because they have managable sized files to work with.