Community « Discussion forum « Localization support board « Facilitating translations - Just an idea «
Comment: Facilitating translations - Just an idea
| << Previous | Next >> |
Bernard:
Isn't it true that, with a growing number of translations, the memory use grow too? As all the text from each language must be loaded into memory it could influence the time used to load also.
It's a long time ago I practice programming but maybe I have an idea that could be of help (or give you a good laugh
).
While writing code work with a version that has one line with an extra code.
For example you have in the index.php the lines:
$local['label_en'] = 'Collections';
$local['label_fr'] = 'Collections';
Change that to:
// $lang
$local['label_(lang of your choice)'] = 'Collections';
$local['label'] = get_local(label['lang']');
(not sure how to put the var's)
with the use of var's in stead of several lines of text.
So you start using one local var in stead of several textlines, but at writing time they are visable saving you that bunch of a overhead you write about.
Before compiling/debug to test the bunch use a script to get every first line after "// $lang" and copy it to a lang file, compare it with the former file and save the added/changed lines for publishing to translators.
Make a backup for the next version en run a script that remove the // $lang and first folowing line from youre sourcecode before compiling and testing and publishing the script(s).
Maybe it helps, greetings Karel.
Isn't it true that, with a growing number of translations, the memory use grow too? As all the text from each language must be loaded into memory it could influence the time used to load also.
It's a long time ago I practice programming but maybe I have an idea that could be of help (or give you a good laugh
).While writing code work with a version that has one line with an extra code.
For example you have in the index.php the lines:
$local['label_en'] = 'Collections';
$local['label_fr'] = 'Collections';
Change that to:
// $lang
$local['label_(lang of your choice)'] = 'Collections';
$local['label'] = get_local(label['lang']');
(not sure how to put the var's)
with the use of var's in stead of several lines of text.
So you start using one local var in stead of several textlines, but at writing time they are visable saving you that bunch of a overhead you write about.
Before compiling/debug to test the bunch use a script to get every first line after "// $lang" and copy it to a lang file, compare it with the former file and save the added/changed lines for publishing to translators.
Make a backup for the next version en run a script that remove the // $lang and first folowing line from youre sourcecode before compiling and testing and publishing the script(s).
Maybe it helps, greetings Karel.
This comment has inspired:
by Puran on June 29 2006
