Click to See Complete Forum and Search --> : Translate US English to UK English Dynamically
mr_gozza
03-18-2010, 03:19 PM
I have a US website that needs recreating for the UK market. All of the content is the same so I'm thinking there must be a way I can do a big find and replace as the page loads. That way I dont have to duplicate all of the files.
It is built in ASP but I guess I would use JavaScript to do the replacing. Any ideas how this could be achieved? I have googled for solutions but nothing really fits what I want.
Thanks
Search & replace could produce a 'pig English' document. Do it on the server not with JavaScript.
Try separate documents and Content Negotiation (http://www.gerv.net/hacking/language-selection/).
mr_gozza
03-22-2010, 08:24 AM
Thanks for the link. I'll read into it and let you know how it works out
mr_gozza
03-22-2010, 08:33 AM
That's a good example for multiple languages of a site but it still requires you to duplicate the data. I want to avoid multiple versions of the page as it is only a list of words that will need changing. Everything else remains the same, hence the find replace idea.
I will definitely keep this link for future projects but any other suggestions on the find replace idea?
This gives the browser language, not the user's preference.
var language = navigator.browserLanguage || window.navigator.language;