0

I'm rebuilding a site that will have both US and UK versions. Now the US and the UK version will be identical content, just allowing for variations in spelling i.e) Color vs colour.

Now while there are a few ways of achieving this I can't think of a method I particularly like.

First Option : Have duplicate content spelt differently and serve it up to visitors based on location. While straightforward enough, the site is very large, has a very involved CMS already and I just know that this option is going to be opening a massive can of worms for me later down the road. It also seems like an excessive amount of work to change a few characters.

Second Option : Write some code to run string comparison and change the spelling based on location. While this would certainly work better, based on preliminary research there are about 1,700 spelling variations between UK-English and US-English. So when testing this idea even the most optimized function I can write has to run on every word, in every text node. Unsurprisingly I tried two different solutions, one in javascript, second in PHP and both are going to be way too slow to be used. The only way I could make this work, is if I only changed the spelling of key content, so ran it on all h1-h6 tags for example, but this isn't really good enough.

So is there a better way than duplicating all site content?

Edit : Reading the post I'm currently duplicating, it seems to me that the duplicate question, is regarding the best way to serve different content for multiple languages. Rather than exploring ways to avoid having duplicate versions of text in the US-UK case. Suggested amendments for relevancy, or should I move the question to this post?

  • Have you thought of using automation workflow like gulp.js to create wrappers around words with two spellings? For instance, Gulp Replace Task can help achieve this. Benefits would be 1) You could automate the wrapper class based on where in the alphabet a word starts with. This would let you check each word against a smaller list. 2) You would only need to look for a class to run your function(s) on, instead of every text node. – Justin McKee May 16 '16 at 06:21
  • Nice idea, however the sites going to have a lot of user generated content Blog posts, articles so it's not practical to try and address instances on a word by word basis unfortunately. – Elliot Holman May 16 '16 at 06:33
  • That was my other question lol. Since it's user generated content, could form processing in some fashion help?.. Instead of doing it on the fly every time the page is loaded. – Justin McKee May 16 '16 at 07:34
  • That's an interesting idea, I was considering writing some plugin into redactor ( which is probably the WYSIWYG I'll end up using ), allowing users to mark specific words as US/UK, which would highlight in the – Elliot Holman May 16 '16 at 08:14

0 Answers0