SV: [Phpmyadmin-devel] Re: Translation tool for phpMyAdmin's string-based languagefiles.
Martin Kronstad
martin at siteman.no
Wed Jan 11 05:44:02 CET 2006
>> You may test the script/app at
>> http://demo.prosjektweb.net/languageadmin/phpmyadmin.php login with
>> username: s , password: s
>> To view available languages for download go to :
>>
>http://demo.prosjektweb.net/languageadmin/phpmyadmin.php?m_action=show_file
>s
>>
>>
>> So I guess my question is do you want to use this app?
>
>I looks great! However I noticed it doesn't handle correctly arrays we
>use for some stuff (byte units, days of week and months).
>
>How does it store updated messages?
>
>--
> Michal Čihař | http://cihar.com
>
Hi!
I actually meant to support arrays, I must have forgotten to make the code,
however it will support arrays.
I'm not sure if I understood your question about how it stores the new
messages but.
How it stores files:
When the app returns from when the user has submitted the form, the file is
parsed again, if the function detects a _REQUEST field with the same name as
a key in the file, the value for the key is changed to the value of
_REQUEST[$key]. Then it adds a line to a variable that holds the entire
file.
When the file has been parsed a the file is saved. The form then uses an
internal array containing the new messages. So the user actually just sees
his own _REQUEST feedback, while the file is written.
I made it this way so I could have the same code for saving as I have for
file parsing. Less code to maintain. I guess I could optimize the code a bit
by adding a handler for the form-submit. But this way I also protect against
people adding new keys to the file.
Anyone who wants to take a look at the code please see
http://demo.prosjektweb.net/languageadmin/langadmin.tar.gz
Mvh Martin Kronstad
Siteman DA
www.siteman.no
Telefon: 32 87 56 10
Mobiltelefon: 951 70 230
Telefaks: 61 13 16 51
More information about the Developers
mailing list