Jump to content
Killersites Community

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

txs Stef.

i'd say that my assumptions would be as follows (for a simple landing website page):

  1. many concerned users block javascript,
  2. client-side solution would expose all my translated files and logic (not sure I really know what I'm talking about),
  3. 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 by fana

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×