View Full Version : using multiple languages in javascript/html pages

11-08-2004, 05:58 PM

I own TextArea Rich, a WYSIWYG editor which we've just released a free version of... we now want to make it multiple languages, but dont want to use PHP or any other server side scripting language.

Is there a good way to have language files included in pages? My initial thoughts would be to have a list of variables which is included in the HTML page, eg: "lang_en.js" (english)

var pop_url_intro = "this is the url editor";
var pop_url_href = "Please enter the url";
var pop_url_target = "Target";
var tooltip_bold = "Bold";
var tooltip_insert_table = "Insert Table";
var menu_option_table_add_row = "Add Row";
etc etc

This looks like it'd be a very long process though. Could these variables then be used in all the window popups? Or would I need to include the language file each time? Or should I have a language file for each actual file in the folder.... this would take a long time to do though.

It's ideas and suggestions I'm after at this stage....I dont want to go coding away to find that it's the wrong thing to do!!

thanks very much.
www.textarearich.com/demo.php if you want to see what I am on about!

11-09-2004, 03:01 AM
you can check out NopeDesigns.com their free javascript shopping cart has multilanguage abilities with html pages I believe there's at least 8 languages all written in js.

I hope this helps.

11-18-2004, 12:05 PM
I couldnt really find anything on there that helps... does anyone have any ideas for the best way to do this? It's really just ideas at this stage I am looking for! thanks :)