I am going to make my web application in 3 different languages, I would like to know if there is a better way to translate the text with javascript, is there any script that will scan the pages for predefined keywords and then replace them with other keywords in another language example: There is a menu: home,about,contact. now the menu is generated with PHP, but if the user clicks开发者_运维问答 on another language, I will be storing it in session, then the javascript will detect that language and replace that menu with home,about,contact but in the chosen language.
After reading this text that I wrote it sounded to like noobish question! :) But I need this right now and I am not really good with javascript. anyway thank you for your time and help.
I think what you are looking for is locale or localization support .
Spring ( java) has this Example here
That should give you some ideas.
A PHP example can be found here PHP example
I think what you are looking for can be found here: http://translate.google.com/translate_tools Just use that code, copy and paste, and you will be able to translate all the pages.
精彩评论