Solved

Multilingual site

Posted on 2006-06-19
3
256 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
  • 2
3 Comments
 
LVL 15

Accepted Solution

by:
bpmurray earned 500 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

This article will show you how to create an ISO CD-ROM/DVD-ROM image (*.iso), and MD5 checksum signature, for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5). It's a good idea to compare checksums, because many installations fail because of a corr…
In  today’s increasingly digital world, managed service providers (MSPs) fight for their customers’ attention, looking for ways to make them stay and purchase more services. One way to encourage that behavior is to develop a dependable brand of prod…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

707 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now