Page 1 of 1

JS pop-up translation

PostPosted: Thu Nov 09, 2006 4:23 am
Author: Whisky
Hi,

Would it be possible for a further IM version to adapt the javascript pop-up texts (for instance the one that pop when you start to type a text in capital letter when writing a post) in order to make thoses texts "translatable" (not sure about this word lol)

Actually they are all directly coded in the php source files and can not be simply adpated in the language files with variables in the [lang] array.

So even if your site is using another language then english, thoses pop-ups are still in english.
I though to translate mine from english to french dirrectly in the code but in my eyes it would be better to completely re-think this system for the official version of IM.

Reactions?

Re: JS pop-up translation

PostPosted: Thu Nov 09, 2006 5:20 pm
Author: Teelk
I had noticed this as well, the trouble is finding a way to call to the php from the javascript file to somehow include language keys.

I'm sure it can be done though.

Re: JS pop-up translation

PostPosted: Fri Nov 10, 2006 4:49 am
Author: Whisky
A simple and immediate solution to circumvent the problem would be to let this part code as it is, but to put it in a stand-alone language php file located in each language folder, then you just have to translate in this file.
And you call this file from the main program with an include ./language/currentlangage/javascript_popup.php where "currentlangage" is the variable containing the board user language of course

just a quick though <img>