- From: Arle Lommel <arle.lommel@dfki.de>
- Date: Tue, 20 Aug 2013 11:25:49 +0200
- To: Jirka Kosek <jirka@kosek.cz>
- Cc: "Lieske, Christian" <christian.lieske@sap.com>, "public-i18n-its-ig@w3.org" <public-i18n-its-ig@w3.org>
> What we can propose is to separate all such translatable content into separate script elements marked by ITS as translateable, something like: > > <script id="PLEASE_WAIT" type="text/plain" its-translate="yes">Please <em>wait</em> ...</script> > > <script type="text/javascript"> > function x(){ > if (document.getElementById("y").innerHTML != > document.getElementById("PLEASE_WAIT").innerText ) { } > } > </script> > > That way you can use standard ITS processing even for localizing strings > inside Javascript with little runtime overhead. > > Jirka This seems like a particularly elegant approach to handling this issue. And it one wanted to you could essentially combine it with Christian’s method to store multiple localizations by simply having ID values like "PLEASE_WAIT-de" where a modest processing layer updates the ID by looking at the locale to pull the appropriate piece of content. Best, Arle
Received on Tuesday, 20 August 2013 09:26:22 UTC