123ArticleOnline Logo
Welcome to 123ArticleOnline.com!
ALL >> Web-Design >> View Article

Tips On Making Website Globalized

Profile Picture
By Author: Alan Smith
Total Articles: 1285
Comment this article
Facebook ShareTwitter ShareGoogle+ ShareTwitter Share

Whatever website text be it a word, sentence, paragraph, link or whatever is stored in a backend database and accessed by a key i.e. an integer, and a language identifier, EN for example. You may have records like: 1, EN, "Hello" and 1, TU also you might have fields that indicates on what page the text can be found that is useful later in the translation application.

For multiple languages each website content page exists one time. There is definitely no need to replicate the source code for each page. Using this approach we can build a php base application and everywhere text appeared in the HTML will be replaced with a php function that simply look like this: p("Hello",1) Here the function 'p' prints the word "Hello" in whatever the language is active at the time. Let say if English is active the function simply returns the English text that was sent to it. But if another language is in use then the function looks up that text entry in the required language and returns it. Here the active language can be stored in a GET or Session variable.

The very obvious benefit of this approach is that the text "Hello" remains ...
... in its rightful place in the page source and is easily readable and maintainable. Sometimes other approaches leaves you with nothing but a cryptic text key and you have to look up the text manually to be able to read the HTML.

Probably you aren't interested in keeping track of a large database of text id's by hand for example, Hello=1, Good bye=2, there are simple approaches to automation this. For example, when programmer writes "Hello" they simply code p("Hello"). Later on an utility runs and find the virgin "Hello", assigns it an id and simply updates the code to look like p("Hello",1). Here the same utility can check existing text entries to see if the English text has been updated or not and then make a note in the database that will also alert translators that the translation must be updated. In database people generally keep track of the current English text and the previous English text so that translators can see history of the text change.

Now what about the efficiency you ask? Just to avoid database lookups for every single text display, generally developer loads entire text database for a particular language into a Session array variable whenever user changes the language. This is fast and user does not notice this. Let say, if you have large website then you might chose to load only selected portions of the website into the array at any one time. Here the 'p' function then does a very fast array lookup to return the appropriate text. Definitely the base language requires no lookup at all since it is already passed to the function.

Copyright © 2010

SPINX, Inc. - Web Design West Hollywood Company offers services like Website Design Portfolio, Website Design Bay Area, Website Design San Diego & also across the globe.

Total Views: 271Word Count: 506See All articles From Author

Add Comment

Web Design Articles

1. Website Designing For Seo: Tips And Techniques For Optimizing Your Website's Design
Author: Vikram kumar

2. Transform Your Business With Android App Development By Globosoft In Ernakulam
Author: Seo Globo

3. Key Features Of Budget’s Sgd 499 E‑commerce Design Package
Author: jaharika2306

4. Key Elements Of Building An Amazon Clone
Author: davidbeckam

5. Hoe Een Webdesign Bedrijf Met De Beste Seo Diensten Jouw Online Succes Versnelt
Author: Olivia Bakker

6. Why Hiring A Web Design Agency In Nyc Like Captivate Designs Is A Game-changer For Your Business
Author: Captivate Designs

7. "how To Choose The Right Web Designer In Kedah Under Rm 500"
Author: vineetha96

8. "affordable Mobile App Development In Selangor – Rm 499 Unlimited Pages"
Author: vineetha96

9. Revolutionizing Security Operations With Online Guard Tour Patrol System – Just 30 Sgd/month
Author: vineetha2

10. “affordable Security Guard Services In Singapore – Just 30 Sgd Per Month”
Author: vineetha2

11. How A Guard Tour Mobile App Transforms Modern Security Operations
Author: vineetha2

12. Boost Your Team’s Productivity With The Supervisor Mobile App In Singapore – Just 1sgd/month
Author: vineetha2

13. Why Your Business Needs An Attendance Tracking System With Free Payroll For Just 1sgd/month
Author: vineetha2

14. Affordable Shopify Web Development In Singapore – Only 499 Sgd For Unlimited Pages
Author: vineetha161996

15. Affordable Mobile App Development In Singapore – Sgd 499 Nett For Unlimited Pages
Author: vineetha161996

Login To Account
Login Email:
Password:
Forgot Password?
New User?
Sign Up Newsletter
Email Address: