0
votes

I'm integrating google's website translator[1] to a client's site.

Everything worked fine and translations were working... however it seems to erronously (and inconsistently) translate the GBP symbol (£) to whatever currency the target language uses. For instance for French and German the symbol is (sometimes) replaced by a EUR symbol (€).

This only happens sometimes, but I can't find a common link between the occurrences other than the currency symbol, so unsure what to do to prevent it.

Obviously £10 will never be the same as $10 or R10 or €10 - so I find myself needing to prevent google from translating currency symbols while allowing it to translate everything else.

The only lead I could find was from their own help[2], but it involves wrapping every instance of the currency symbol in a span or div which is completely impractical for this application.

Does anyone know a better way?

[1] http://translate.google.com/manager/website/add?hl=en

[2] http://support.google.com/translate/#2641276

1

1 Answers

2
votes

The only way I could find to control this was by using the class='notranslate' method and wrapping every instance of a price that I could find in a span with that class.

Google's support say that you can use that class on any (valid) HTML element and it will be left alone, so I used it on some selects with prices in them, etc.

All in all, a horrible solution but it beats having prices displayed wrongly to anyone who can't read english.