Multilingualism in company webs
Website of the Generalitat, Government of Catalonia Contact
Home: Are you a webmaster? How is the web site designed to make production in various languages easier?
How is the web site designed to make production
in various languages easier?

Technical aspects
<buit>
Other technical recommendations for internationalisation
    These recommendations are also based on proposals by W3C.

Navigators
Structure of directories and files
Names of files and directories
Identifiers
Separate format for the content
Styles
Different data formats
Cookies
Elements <EMBED>
Navigators
Design the page as generically as possible, compatible for the different navigators and versions of navigators.
 
UpUp
 
Structure of directories and files
A structure of directories and files has to be established which facilitates the task of the searchers and allows for minimal manipulation of the links. In the following example, only the links on the initial page change, but not between the directories.

The initial page of the principal language contains the directory structure.
E.g.: index.html
The initial pages of each language are also on the root and contain a language identifier in the name.
E.g.: index_ca.html
The rest of the pages have identical names in all the languages, but are in different language directories.

This structure applied to a whole web means that simply changing "en" for "ca" changes the language of the page. E.g.:
http://www.xxx.net/en/clients.html
http://www.xxx.net/ca/clients.html
example image
 
UpUp
 
Names of files and directories
It is recommended not to translate the names of files and directories because it would make it very difficult to control all the changed file names when creating links between the pages. If just the name of the directory is changed, it is easier to change the routes of the links. E.g.

http://www.xxx.net/ca/pagines/serveis.htm
http://www.xxx.net/en/pages/services.htm
http://www.xxx.net/es/paginas/servicios.htm

http://www.xxx.net/ca/pagines/serveis.htm
http://www.xxx.net/en/pagines/serveis.htm
http://www.xxx.net/es/pagines/serveis.htm

With regard to the names of images, changing these is not recommended. In section 3.3 you can see how to handle them according to the text language contained.
 
UpUp
 
Identifiers
It is important to make it easy to identify text translatable between codes. One way to do this is to add an ID label to each of the translatable elements.

An ID is very useful in getting the best out of the translations and reusing the text among the pages.
The ID has to be unique.
HTML allows for an ID for all the attributes, except <title>.
 
UpUp
 
Separate format for the content
The format information (bold, underlining, etc.) must be separated from the textual content (title, link name, etc.), since the translation may not need the same format.

<tr>
<td><span class="apartats">Format separat del contingut</span><br>
Cal separar la informaci&oacute; de format (negreta, subratllat, etc.) del contingut textual (t&iacute;tol, nom d&rsquo;enlla&ccedil;, etc.), ja que la traducci&oacute; potser no ha de tenir el mateix format.</td>
</tr>

 
UpUp
 
Styles
As far as possible, in questions of format it is recommended to use styles instead of labels. This facilitates, for example, the migration from FrameMaker to XML/HTML.

<tr>
<td><strong><font color="#FF6633" size="2" face="Arial, Helvetica, sans-serif">Format separat del contingut</font></strong><br>
<font size="2" face="Arial, Helvetica, sans-serif">Cal separar la informaci&oacute; de format (negreta, subratllat, etc.) del contingut textual
(t&iacute;tol, nom d&rsquo;enlla&ccedil;, etc.) ja que la traducci&oacute; potser no ha de tenir el mateix format.</font></td>
</tr>

<tr>
<td class="text"><span class="apartats">Format separat del contingut</span><br>
Cal separar la informaci&oacute; de format (negreta, subratllat, etc.) del contingut textual (t&iacute;tol, nom d&rsquo;enlla&ccedil;, etc.), ja que la traducci&oacute; potser no ha de tenir el mateix format.</td>
</tr>
 
UpUp
 
Different data formats
Include the possibility of choosing different data formats, for example day/month/year (Catalan format), month/day/year (American format), etc. Then, in localizing the page in other languages it will not be necessary to change the code at this point. The work of engineering and modification of the code during the process of localisation is expensive and complex. Therefore, anything that simplifies the work of engineering is very recommendable.
 
UpUp
 
Cookies
It is recommendable to use cookies to record the visitor's preferred language. The following table shows a fragment of code with the cookie that chooses the initial page of Google in Catalan:

#set user preference on Google to Catalan language
request = httplib.HTTPConnection('www.google.com')
request.putrequest ('GET', '/setprefs?submit2=Save+Preferences+&hl=ca&lang=all&safe=images' \
'&num=10&q=&prev=http%3A%2F%2Fwww.google.com%2F&ie=UTF-8&oe=UTF-8')
request.putheader('Cookie', cookie)
request.endheaders()
response = request.getresponse()
request.close()

However, there are users who are against the use of cookies, since they remain stored in their computers. If the user has disabled the option of receiving cookies in his or her navigator, the webs which work with cookies will not "remember" the language chosen on the last visit.

As a useful technical note for businessmen who want to assess the models of welcome page that we are examining, we explain below how to enable or disable the reception of cookies and how to see the cookies that we have already received in our computer and delete them if we wish.

How to enable or disable cookies:

enlarge image
With Internet Explorer 6:

Click on Tools > Internet options... > Personalise level... It opens the window Configuration of security in which the options for cookies have to be activated.
example image
enlarge image
With Navigator 7.0:

Click on Edit > Preferences > Personalise level... It opens the window with dropdown menus on the left. On Privacy and security we select Cookies and choose the option Enable all cookies.
example image
How do we see the cookies we have already received?

Through the cookie controller, which allows us to delete them if we wish. In the case of UOC, if it is the first time that this web has been accessed (http://www.uoc.edu) we have to select the entry language, for example, Catalan.

As a result of our selection, we can see with the cookie controller that we have received the cookie which, from this moment, will save us from having to select the language every time we visit this web and will send us automatically to the portal in Catalan (http://www.uoc.edu/web/cat/index.html).

How do we see the cookies we have already received?
example image
Fletxa que indica cap a sota
example image
 
UpUp
 
ELEMENTS <EMBED>
These elements, like SQL scripts and queries, need clear identification because the localization requires it. To facilitate the localization:

Place them outside the document (through inclusion mechanisms).
Internationalise them correctly.
UpUp
   
 
Content
1. Introduction
2. What do you want to translate?
3. How is the web site designed to make production in various languages easier?
3.1. Technical aspects
3.2. Textual content
3.3. Graphic content
4. The localization phase
4.1. Preparation
4.2. Realisation
5. After localization: the checking phase
5.1. Functional
5.2. Visual
6. Style guide
> Bibliography
Next
         
© Generalitat de Catalunya
Legal notice
E-mail