Multilanguage scripts - how to? - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Scripting (/forumdisplay.php?fid=39) +----- Thread: Multilanguage scripts - how to? (/showthread.php?tid=69208) Multilanguage scripts - how to? by ketchup_blade on 12-06-2006 at 03:18 PM
Hello, RE: Multilanguage scripts - how to? by Ezra on 12-06-2006 at 03:26 PM You can check the current MsgPlus language in the registry RE: Multilanguage scripts - how to? by Matti on 12-06-2006 at 03:47 PM
To make your script multilingual, it takes a lot of work. Screenshot Sender 4 is a good example: it makes an object "Language" which contains arrays for every translation section. So, if you would have a file called "English.ini" with the following content: code:the script could create an object from the file and then you can get the string with something like this: code: I suggest you to install the SS4 script and take a look at the code. As for static texts which can't be changed using a function, (like a Help attribute) the script has a function which can re-write the interface XML file and replace the content of the elements by the strings from the .ini-file. RE: Multilanguage scripts - how to? by Spunky on 12-06-2006 at 03:50 PM
quote: HKEY_CURRENT_USER\Software\Patchou\Messenger Plus! Live\LanguageFile EDIT: Attached Example Language File. This reads information from the specified file and returns it. Usage: read(<language file path>,"Messages","Alert"); would return "Warning! This script is available in lots of languages!" in Mattike's Case. Use this in: PlusWnd.SetControlText("<control name>",read(<language file path>,"Messages","Alert")) RE: Multilanguage scripts - how to? by Matti on 12-06-2006 at 04:24 PM But in your case, the script would have to read the text file every time it needs a string from the file, which is in most cases a lot. Therefore, it's better to load everything into an object/array and get the strings from there. |