Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Nov 2002
    Location
    Manchester, UK
    Posts
    533
    Thanks
    4
    Thanked 1 Time in 1 Post

    using multiple languages in javascript/html pages

    Hey,

    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)

    Code:
    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!

  • #2
    Regular Coder
    Join Date
    Sep 2002
    Posts
    462
    Thanks
    0
    Thanked 20 Times in 20 Posts
    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.
    NO Limits!! DHCreationStation.com
    ------------------------------------------------------------
    For projects using MediaTypes (MIMETypes) visit E-BAM.net -(updated weekly)

    Broken items wanted for tinkerin'! PostItNow@BrokenEquipment.com
    Global Complaint Dept.

  • #3
    Regular Coder
    Join Date
    Nov 2002
    Location
    Manchester, UK
    Posts
    533
    Thanks
    4
    Thanked 1 Time in 1 Post
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •