Appendix C. CSS and artwork globalization 169
In this way, JSP codes can easily retrieve culture-sensitive information from these CSS fields,
as illustrated in Example C-4.
Example: C-4 Retrieving culture-sensitive information from CSS fields
<%
String localStr = “en_US” // localStr should be locale relative string, such as
de_DE,jp_JP etc.
%>
<link rel=”stylesheet” type=”text/css”
href=”/git4/Resources/<%=localStr%>/css/default.css”>
C.2 Avoid language-dependent restrictions
Textual data in images
Since image file textual data cannot be automatically translated by today's translation tools,
when textual data in one language in a Web page image is displayed in another, that image
must be re-drawn to accommodate the translated text. To avoid this kind of problem, we
recommend that your images not contain textual data so that e-business application image
files might be used in all language versions.
Tables
Table design (especially with regards to column width) can also be adversely affected by the
languages of the data contained in the table. A sentence or phrase in English can grow longer
or shorter when translated into another language, so that if a piece of data must be contained
in a single table, columns should be wide enough to contain that data in multiple language
versions. Figure C-2 shows a table cell not wide enough to hold the French translation of
“How are you.”
Figure C-2 Table with fixed column width
The CSS code producing the table in Example C-5 is shown in Example 1.
Example: C-5 Sample CSS codes producing table with fixed column width
.table {
font-family: “Arial”, “Helvetica”, “sans-serif”;
font-size: 12px;
font-weight: bold;
color: #000066;
background-color: #BCEAFE;
height: 26px;
width: 120px;
}
Since its table column width is fixed, the data in French is displayed on two lines instead of
one, making the table look awkward.