Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Orion/Internationalization"

Line 16: Line 16:
  
 
Plugins can contribute declarative metadata containing strings that may be shown to the user. This may include information about the plugin itself (author, license, etc), and service information (command names, tooltips). We currently do not have a mechanism for enabling externalization or substitution of these strings, but eventually we will need it.
 
Plugins can contribute declarative metadata containing strings that may be shown to the user. This may include information about the plugin itself (author, license, etc), and service information (command names, tooltips). We currently do not have a mechanism for enabling externalization or substitution of these strings, but eventually we will need it.
 +
 +
== Server ==
 +
 +
Most server strings are not currently externalized, but could easily be done using current Equinox API. The easy case is single language servers, where the natural language is provided when the server starts and it never changes. More complex would be multi-language servers where each request can have a different language and server uses the HTTP Accept-Language header to determine response language for that request. Equinox has not come up with a performant way to do this (see {{bug|226340}}), and any prerequisite dependencies such as org.eclipse.* libraries won't support it.
  
 
[[Category:Orion]]
 
[[Category:Orion]]

Revision as of 17:51, 9 February 2012

This page is a hub for resources relating to preparing Orion for use in other languages and locales (also known by the abbreviation i18n). This work involves translating strings into other languages (often called NLS for Natural Language Support), handling bi-directional text (BIDI), and preparing content such as dates and times in a format appropriate for a given locale.

Orion Editor

We have been externalizing the editor/textview strings. This is probably the biggest task for most components in Orion (other than the editor). Of course, when strings are externalized, layout problems start showing up.

The editor also needs to make sure stuff like BIDI, IME, DBSC and Unicode Surrogates are all working properly. We paid some attention to these when we were first designing the editor, but there is lots of work to make the Orion editor BIDI aware to the same level of the Eclipse Desktop editor.

For the externalization of strings in the editor we used the i18n plugin of RequireJS. It works quite well and it is lightweight. The one function that is missing is a way to replace template strings like: "Line {0} : Col {1}", but this is a available in dojo (dojo.replace). The editor does not have a dependency on dojo, so we had to write our own.

Dojo

Dojo provides some i18n support that may be useful in much of our client code. See the Dojo reference guide for details.

Plugins

Plugins can contribute declarative metadata containing strings that may be shown to the user. This may include information about the plugin itself (author, license, etc), and service information (command names, tooltips). We currently do not have a mechanism for enabling externalization or substitution of these strings, but eventually we will need it.

Server

Most server strings are not currently externalized, but could easily be done using current Equinox API. The easy case is single language servers, where the natural language is provided when the server starts and it never changes. More complex would be multi-language servers where each request can have a different language and server uses the HTTP Accept-Language header to determine response language for that request. Equinox has not come up with a performant way to do this (see bug 226340), and any prerequisite dependencies such as org.eclipse.* libraries won't support it.

Back to the top