A Domino multilingual Web site is generally constructed in one of two ways -- either as a set of unilingual databases, or as a single multilingual database, where users may choose the language in which they want to see the user interface. A combination of both types is also possible. Multilingual and unilingual databases are both types of localized databases:
- A multilingual database has its design elements localized in several languages. In other words, during the localization of the application, Domino Global WorkBench creates the application design -- all the user-visible strings for buttons, labels, and so forth -- in as many languages as needed within the same database. Based on the user's language preference, which is set in the Notes 6 client or a Web browser, Domino 6 automatically displays the design in that language, and other languages are hidden from the user. For example, an icon might be translated in both French and German: If the user chooses to use the French version of the database, only the French button is displayed, even though the database also contains a German icon. This automatic display of the user's preferred language was a significant new feature of Domino 5 and Notes 5 and was further improved in Domino 6 and Notes 6.
- The database content may also be displayed in the user's preferred language, depending on how the application was developed. A single multilingual database is useful for a site that will be accessed by people who, as a group, do not share the same language. French users may choose to see the user interface in French, while German users may see it in German, and Japanese in Japanese, and so on. Documents are displayed by default in the language in whichthey are create. It is up to the developer to create views that only display documents in the same language as the design, if that is a requirement, or to restrict the display of documents depending on the language used in those documents.
- A unilingual database has its design elements localized in one language only, which means users see the user interface in that language.
Users will see the documents created in the database in the language that was used to create those documents. It is up to the application developer whether or not to create views that only display documents in the same language as the UI. To allow users to switch languages in a Web site that is composed of multiple unilingual databases, developers have a few options:
- One particularly clean way to take end users to their language choice in a site that consists of several unilingual databases is to create a small multilingual database consisting of a single page for each supported language. The best match will be selected (the language closest to the language preference set in the user's client), and any further navigation can be directed toward the appropriate language database. Domino 6 automatically displays multilingual databases to users in their own language (based on preferences set in their client), so users will see the selections page in their own language and their selections will take them to the appropriate unilingual database.
- A variation of the first option would be to automatically redirect the user to the unilingual database of the same language as the language displayed in the multilingual database (in other words, to the version that in the same language as their preference setting).
- Another variation is to make the home page with language selections available within one of the unilingual databases for the site.
- Finally, you can take users to a default language and let them switch to their language of choice using the Language SwitchBar from within the database itself. (The Language SwitchBar was a new feature in R5).
There are no straightforward rules for determining which of these architectures to use for any given Web site. Developers and Web site managers should make their decision based on the application, the end user profile, and various economic and regional criteria. This article uses both kinds of databases as examples.
The language SwitchBar
The SwitchBar automatically gives users of unilingual databases access to the other language versions of the site by directing their browser to the URL of the document in the appropriate localized database. The SwitchBar must be added to a form using Domino Designer 6. You can add a language SwitchBar to any form in a unilingual database that is marked "Translatable." To be able to display the Language SwitchBar, you need to decide beforehand where you would like the SwitchBar to appear by creating a rich text field called $Lng_Switchbar in the relevant form, in this case, to the Product form.
The Synchronizer automatically fills this field with URL links to the other language versions of the document. You can either make the field editable or you can make it computed, preserving its value on save. The Language SwitchBar will show URL links only to those versions of the document that have the status Translated. This ensures that users have access only to documents that have been translated and approved. Note: the SwitchBar is available only in synchronized unilingual databases, not in multilingual databases. |