fana Posted March 22, 2018 Report Share Posted March 22, 2018 Hi there, Im have a simple website, for SOHO business, with just a couple of few static pages. Id like to have several translated versions of my site: instead of creating new copies of each page, with a translated version of each content, meaning I would have to reload all pages and images each time id click a page (slowing down the site's performance)... I was wondering if I could just use: 1) some JS hard-coded lines, such as document.getElementByID("targetContent") and innerHTML ="translatedContent" to change tagged content(s). 2) a SQL table with my translated content, and retrieve these values into the related content areas. 3) any other option Id like to know your opinion about best practices. Txs. Link to comment Share on other sites More sharing options...
administrator Posted March 22, 2018 Report Share Posted March 22, 2018 Hi, This is what we nerds call 'internationalization' ... and there are different strategies for that. All are time consuming. I would search for something like: client side javascript internationalization Or, perhaps server side .... if you have that skill. It will probably be easier to do it via server side (values stored in an SQL table or flat file) using JS, PHP or whatever language you prefer. Stef Link to comment Share on other sites More sharing options...
fana Posted March 23, 2018 Author Report Share Posted March 23, 2018 (edited) txs Stef. i'd say that my assumptions would be as follows (for a simple landing website page): many concerned users block javascript, client-side solution would expose all my translated files and logic (not sure I really know what I'm talking about), create a solution with minimal impact on (code) structure and logic for newer translation versions (added content and/or added languages) Therefore: 3. use a server-side solution: PHP or JS? 4. use DB, as per your suggestion. Being PHP the most popular, I'd would opt for it, for the sake of pragmatism... but then JS (server-side) is catching-up very fast.... Stef: I need your guidance! What else am I missing here? Txs for your support... and keep up the good work, and releasing (new) courses. F Edited March 23, 2018 by fana Link to comment Share on other sites More sharing options...
MiralJi Posted August 18, 2020 Report Share Posted August 18, 2020 I need to make several translated versions of my site and legalize all documents. 1 Link to comment Share on other sites More sharing options...
Recommended Posts