Hi Zbigniew,

Thank you very much!

Today,I tried to apply the DSpace i18n patch successfully.But i can't see
the language selection on the webui....It seems there are something
missing...Have you ever used the patch before,and if you ever found any
useful documents about it?

It seems that it is not easy to support multi-language in DSpace..

Thank you.

Best Regards,
Jimmy.

On 5/8/07, Zbigniew Ciok <[EMAIL PROTECTED]> wrote:

Quoting my dspace <[EMAIL PROTECTED]>:

> Hi Zbigniew,
>
> I am assigned a task to i18nization the DSpace.The first language we
want to
> support is Chinese...I would like to add a drop-down list to select the
> language the user prefer to...And I am wondering the process/steps
of  to do
> it....
>
> Could you give me some advice?
>
> Thanks in Advance.
>
> Best Regards,
> Jimmy
>

Hi Jimmy,

I describe you the most simple and also general solution.

1.
In ../tomcat../webapps/your-dspace/WEB-INF/classes
you have to have files, eg:
Messages_de.properties
Messages_el.properties
.
.
.
Messages_zh_TW.properties - (Chinese traditional).


2.
Let us assume that you have two pages:
page1.jsp
page2.jsp.
2.1.
On the page1 you have a 'select list' and a 'submit' button - for a
choice of a language.
2.2.
On the first and the second page you install a code for i18n.

3.
On the "declaratory part" of both jsp you should have

<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"; prefix="fmt" %>

and further:

<fmt:setBundle basename="<%= bundleName %> scope="session" />

4.
On page1.jsp, after pressing the 'submit' (the choice of the language)
should be set a variable which within a session scope will remember
the chosen language.  This information can be, for example, read in
the following way:

<%
        bundleName = (String) session.getAttribute("bundleName");
%>

On internationalized pages bundleName = "Messages_de", "Messages_el",...

5.
On so initiated pages you display messages from Message_*.properties with:

<fmt:message key="... />,

where key in Messages*.* has the form, eg:

jsp.browse.author.enter = oder geben....

6.
Notes
6.1.
DSpace delivers requisite libraries - jstl which should be in the
catalogue lib.
6.2
Values of keys in Messages*.* should be for Chinese languages coded in
the form \uXXXX.
6.3
Remember, Messages*.* are in other places of a catalogue with source
data and a catalogue with deployed code.
6.4.
Remember that making changes in DSpace you can have problems with
installation of next versions of DSpace. Look the DSpace
documentation, wiki.dspace.org.
6.5.
With the described manner you can't internationalize data originating
from behind Messages*.*.


7.
If above advices are for you too general, ask next questions.

Regards
Zbigniew Ciok



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to