Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Multilingual site

Posted on 2006-06-19
3
Medium Priority
?
263 Views
Last Modified: 2010-04-01
hi experts,

I'm tying to develop a site which will have more then one language. Currently I'm dealing with 2 language. 1. English. 2.Asian Lang.(Right to left)
I like to code which should take care of any language and get me the proper result. By default I want to display english content.

guide me how to have this correctly put up. I'm planing to have 2 databases. one for English and other for Asian Language. Both will have identicial tables and fields only content will be differ.

English Site:-
------------------------------------------------------
 Logo                        (Top Banner)
------------------------------------------------------
            |
            |
 Left      |
 Menus  |
            |
            |
            |
            |
            |
            |
---------------------------------------------------------

Asian Language Site:- (Writes right to left)
------------------------------------------------------|
                             (Top Banner)         Logo    |
------------------------------------------------------|
                                                   |               |
                                                   |               |
                                                   |     Left     |
                                                   |     Menus |
                                                   |               |
                                                   |               |
                                                   |               |
                                                   |               |                                                  
                                                   |               |
                                                   |               |
                                                   |               |
 ---------------------------------------------------------
       
Please if anyone has experience with Multilingual site guide me thru. how to have home page code and all inner pages.
Atleast if someone give me sample code for left menus.(Menus.jsp) what will help a lot.

HomePage.jsp includes <top.jsp> and <menus.jsp>
how can I code when its default or english menus should be on left side. And when its Asianlanauge everything should be right aligned.

Thanks in adavance.
PH


0
Comment
Question by:princehyderabad
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 15

Accepted Solution

by:
bpmurray earned 2000 total points
ID: 16943202
Why should Asian languages be right to left? I presume you mean Hebrew and Arabic, which are from the Middle-East. Use the term BiDi instead - this is short for bi-directional, where the local language is written right to left, and embedded English is written left to right. Note that the data is stored in natural order - the display engine changes the direction. This means that a string like this (upper-case is bidi text): "Hello ARABIC and HEBREW world" is displayed as: "Hello CIBARA and WERBEH world".

The main tips are to use the direction attribute, i.e. dir="LTR|RTL". You're using framesets, so this is an issue: from my experience with framesets, the DIR="RTL" doesn't do what you really want. This means that you have to programmatically change the sizes and positions of the frames you're using. This should be fine from within a JSP, where you can use the locale information to determine the directionality, and then print the frameset/frame information depending on what you pick up. The individual frame contents should be fine - the browsers are pretty good at handling BiDi.

So these are the changes you want:

All pages should be tagged as UTF-8, and the text should be Unicode UTF-8:

     <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" ... %>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     <html:form enctype="UTF-8" ...>
     <% request.setCharacterEncoding("UTF-8");%>

Strings on the page should be resourced, i.e. held in bundle files. Use JSTL <fmt:xxx> to manage these:
   <fmt:setBundle basename="stringdata"/>

This then allows you to use <fmt:message> to include translated texts in your pages. For example, this is a typical login page:
    Name:       <input id="UserName" />
    Password:  <input type="password" id="Password" />

To change this to a localized version, you could do something like:
    <fmt:message key="username">:   <input id="UserName" />
    <fmt:message key="password">:   <input type="password" id="Password" />
0
 

Author Comment

by:princehyderabad
ID: 16945267
>>Why should Asian languages be right to left? I presume you mean Hebrew and Arabic, which are from the Middle-East.
One of Indian languages "Urdu" as well write right to left.

Okay requirment are changed now.

English: will have regular Left menu from DB. top banner as Image and Main content page from DB and DHTML.
AsianLanaguge: top banner as Image, Left Menu as Image, main content page from DB and DHTML.

I think now I should have two folder placing english code in one and Urdu code in other folder. Both will have different DB. Few tables may be identitals.

I think now site is pretty straight fwd. anyone having multilingular experice can provided there experices and guide line .....

thx,
PH
0
 
LVL 15

Expert Comment

by:bpmurray
ID: 16945803
Hmm - I thought Urdu was Pakistani/Afghani, not Indian :-)

You have a choice: you can create separate translated wed sites, but that makes it difficult and expensive to maintain, or you can create a single web site that uses external texts that are included using JSTL bundle tags. If you have only 2 or 3 languages, it's probably easier to do the first part, but if you plan on supporting all 14 (?) Indic languages as well as Urdu, you would be much better off using bundle files.
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Geo-targeting is the practice of distributing content based on a person’s location, as best as you can determine it. Let’s look at some ways you could successfully use this tactic. The following tips and case studies could lead to meaningful results.
Tech spooks aren't just for those who are tech savvy, it also happens to those of us running a business. Check out the top tech spooks for business owners.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question