I need to design a translation mechanism/strategy for the static text in my (scalable) web applications - which are based on HTML, JQuery/JavaScript in an ASP.NET environment (but no server side controls) with dynamic data loaded from asynchronous jQuery calls to http handlers.
I have successfully localised numbers, dates, etc using Globalize, however now need to sort out the text translation.
Translated text is stored appropriately in a database (maintained by native partners in another application), therefore, I do not want to use a file based ResX equivalent, like jQuery Localisation/jQuery Localize/jQuery-i18n-properties approaches, instead I am after a solution similar to extending the Resource-Provider Model that localises ASP.NET controls (which I don't have), to get the translation from the database.
Client Side Approach: I just stumbled across i18next's dynamic (non-static) resouce route and am trying to work out if I can return something like that from a http handler (and caching in JStorage/LawnChair) to fill in place-holders/tags using the jQuery function or take a similar approach with Moustache or hogan.js templates.
Server Side Approach: Modify the HTML before it is served, for example this answer suggests using the HttpResponse.Filter to modify the response server side (see this article). As the buffer is chunked, I'd have to capture the entire stream as suggested here, which does lead to a performance hit, however, I hope I can mitigate this by caching each (language) version of the page.
Or use HTTP Handlers like this looks like simpler approach, though I am less sure how to cache multiple versions of the page in this instance.
Does anyone else have experience with these approaches or know of anything similar or 'best practices' that meets the requirements especially in terms of performance, scalability and maintainability?
If anything isn't clear, please let me know, I am new to web development. :)
Note: This is for web applications running on tablets/hand-held devices for data capture, it isn't a CMS or static site (the previous incarnation used to run on the .Net Compact Framework, for about 5 years and it's time for an update so users can use non-windows devices such as android and IPad).