|
findinsite-js language support
Introduction
findinsite-js automatically responds to search queries using each user's
preferred language and character set - if possible.
(Users set their preferred language in their browser.)
Alternatively, a user can override the preferred language setting
as described below. The override language
setting is stored in a cookie (for one year).
Response language
Currently, fourteen response languages are supported,
with English the default if the user's preferred language is not recognised.
The findinsite-js Configuration screen shows all the languages
that are currently loaded. This should be the same as the list below.
Some Western browsers will not be able to display the Asian language names correctly.
Response Character Set
findinsite-js always responds using the UTF-8 character set (charset).
If any characters cannot be represented, then they are represented
with HTML escape sequences.
findinsite-js uses the Java servlet engine's built-in facilities to do this job;
if the servlet engine supports this functionality then most users' character
sets should be supported.
Local language name |
Language name in English |
Language code |
Country code |
Supplied file |
| English |
English |
en |
|
built in |
| Deutsch |
German |
de |
|
/com/phdcc/lang/findDe3.hil |
| Español |
Spanish |
es |
|
/com/phdcc/lang/findEs3.hil |
| Français |
French |
fr |
|
/com/phdcc/lang/findFr3.hil |
| Hrvatski |
Croatian |
hr |
|
/com/phdcc/lang/findHr3.hil |
| Italiano |
Italian |
it |
|
/com/phdcc/lang/findIt3.hil |
| Nederlands |
Dutch |
nl |
|
/com/phdcc/lang/findNl3.hil |
| Norsk |
Norwegian |
no |
|
/com/phdcc/lang/findNo3.hil |
| Português |
Portuguese |
pt |
|
/com/phdcc/lang/findPt3.hil |
| Slovenščina |
Slovenian |
sl |
|
/com/phdcc/lang/findSl3.hil |
| العربية |
Arabic |
ar |
|
/com/phdcc/lang/findAr3.hil |
| 日本語 |
Japanese |
ja |
|
/com/phdcc/lang/findIt3.hil |
| 简体中文 |
Simplified Chinese |
zh |
|
/com/phdcc/lang/findZh3.hil |
| 繁体中文 |
Traditional Chinese |
zh |
TW |
/com/phdcc/lang/findZhTW3.hil |
The table above gives the ISO Language Code and where specified,
the ISO Country Code.
The two character lower case language codes are defined by ISO-639 at
http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt.
The two character upper case country codes are defined by ISO-3166 at
http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html.
User's Preference
findinsite-js works out which language to use by looking at a header sent
by each user's browser. The Accept-Language HTTP header
has a list of the user's preferred languages, specifying a language code,
a country code and a priority.
findinsite-js tries to match the language and country codes first.
Then a language code match is used.
If there is no match then English is used.
User Language Override
By default the findinsite-js output includes set language links like this in the page footer:
If a user clicks on one of the named links, then findinsite-js will always use that language for its output.
(The user's browser must have cookies enabled for this to work.) Click on the "Language" link
to turn off this override.
The set language links are generated when %LANGUAGES%
appears in one of the findinsite-js template files.
Adding more languages
You can add support for more languages (or change the existing languages)
by setting the Additional Languages box in the Configuration screen
Look and Feel section.
You need to alter or write a language file for each language.
Please contact sales/support if you want to
do this. It's not too hard - you just need a plain text editor.
Put the language file(s) in the same directory as findinsitejs.jar, eg
the WEB-INF/lib/ directory.
Then put a comma separated list of the language files in the
Additional Languages box, eg:
/FindEnGB3.hil, /FindEl3.hil
If one of your language files specifies a language code / country code combination
that already exists, then your language file will take precedence over the existing file.
findinsite-js has several language files built in to its runtime, findinsitejs.jar.
The names of these built in files are given in the languages table at the top of this page.
You can use an unzipper tool to extract these languages files.
|