Yesterday, Jens and I was discussing about the yum langpack plugin, and a recent bugzilla bug ([Bug 518395] add @input-methods to Package Selection screen). During the discussion, we find out that there are at least following issues to be considered:
- Aspect of Language Support:
- Language pack
- Input Method/Keyboard layouts
- Fonts
- Spell Checking
- ….
- Type of package i18n support
- Translation files, such as .mo
- Language packs. This may involve naming pattern detection.
- None
At first stage, we postpone the technical details of handling internationalized packages, but concentrate on obtaining and storing the users’ i18n preference.
For example, Caius wants a set of fonts that covers all language, as far as possible, an he understands English, Chinese, and Japanese, thus he needs corresponding input methods and spell checking. He prefers to see menus and items in Japanese, so Japanese langpacks are required. He also need an English spell checker
Storing
His preference can be stored as:
/etc/sysconfig/lang-setting/langpack
:
/etc/sysconfig/lang-setting/input_method
:
/etc/sysconfig/lang-setting/spell_check
:
/etc/sysconfig/lang-setting/font
:
Usage
Jens’ langpack plugins gets benefit from this approach. The plugin determines whether to add or remove langpacks according to langpacks
.
And for anaconda and system-config-language, this approach provide further knobs to tune. For example, IBus will be pulled in as dependency if there is at least one Asian languages in input_methods
. Spell checkers and even voice data can be dealt with the similar way.
Fonts are a bit different. By default, we installed a set of fonts that cover languages as much as possible. But on resource-limited systems, system admin can exclude fonts by adding a “-” in front of the languages to be excluded. Or alternatively, just list the language you want. Say, the OLPC to Uganda can be loaded with:
/etc/sysconfig/lang-setting/font
:
User Interface in setting dialog.
Regarding UI, I suggest something like:
Overview |
Language Pack |
Input Method |
Font |
|
|
Language Name |
|
English (US) |
Chinese (HK) |
Japanese (JP) |
|
Language Group↓ |
Language↓ |
|
|
Language pack |
☐ |
Input method |
☐ |
Fonts |
☑ |
Spell check |
☐ |
Add |
Delete |
Ok |
Cancel |
Please forgive my terrible html table drawing skill. Mmm, may be I should use glade to produce a real dialog. 🙂
On top of the “dialog(?)” are pages of GNotebook. Click on other pages for more advance settings. This page is for overall setting.
In overall setting page, we have an active list for showing current active languages, the degree of support can be either listed here or in individual advance setting.
In the middle of setting page, there is a language group pull-down which lists the geographic division of languages, such as Eastern Asia, Middle East,… etc.
The contents language pull-down is narrow down by the language group. Thus a user do not need to scroll through hundreds of languages.
Below the pull-downs are aspects of support checkboxes. They are self-explaining.
On the bottom there are buttons that add/delete the language from/to the active list.
and Ok/Cancel to confirm the modification.