![]() |
|
|
|
Alventis supports text in a variety of languages and alphabets. This chapter will explain what is and is not supported, and what pertinent features are at your disposal.
The single most important element of Alventis' multilingual support is Character Set or Charset. This is a property of fonts that determines the subset of characters that are available at any given time. Here's how it works. Imagine you have a Text Box. The Text Box has a Font attribute, and the entire Text Box can only display its contents using a single font. Since Charset is a property or attribute of a font, it follows that the Text Box can only display its contents using one Charset at a time. This Charset (as well as the font) can vary, but the important point and limitation is that only a single Charset can be in effect for any single item at any given time. The only exception to this rule is an Alventis Memo, which can display text in a variety of formats, fonts, and Charsets, but we are only interested in all the other items here.
The above "one Charset" limitation is usually quite tolerable. Let's see what exactly it "means" to a Text Box. It means that once the Text Box's Charset has been set, the Box can only display the available subset of characters. For all textual Charsets (this excludes the special Symbol Charset which has no relevancy to multilingual issues discussed here), the available subset of characters includes all letters of the Latin alphabet (as found in the English language) plus the alphabet of your choice: Greek, Cyrillic, Hebrew, etc. As a result, setting the Charset of your Text Box to Greek will allow you to mix Greek with English (or any other language using the Latin alphabet, but we'll use English in our examples). If the Charset is set to Cyrillic, you can mix Russian and English text, and so on. Basically, the limitation imposed on you by a single Charset limits you to using up to two alphabets at the same time, one of which must be Latin. You cannot mix text from multiple non-Latin alphabets, so you won't be able to put Greek and Russian text in the same Text Box. If this is not on your agenda, you should not encounter any problems.
Items in Alventis and Designer default to the Western Charset, which covers the Latin alphabet and letters with accents and diacritics. If you need to use some other alphabet, say, Cyrillic, you must make some adjustments that vary depending on what it is you are trying to do. We will use Russian/Cyrillic in the following examples, but they apply to any other alphabet.
Russian InfoView. Alright, so you want an entirely Russian InfoView: Russian Labels, Russian text in Text Boxes, etc. Since we're talking about designing an InfoView, this is obviously a task for Designer. Open the InfoView and select the items you want to affect (you can affect them all if you wish by not selecting any items at all: see the Attribute Inheritance section). Change their Font's Charset attribute to Cyrillic. Edit the Labels' Captions as necessary. You're done. To return the Charset to its default "unspecified" value, use the Set Charset to Default button
Mixed Contents. Imagine you have a table of films, and you want to record the film's title in its language of origin. This is a tricky proposition since you now have data whose single field's values may use variable alphabets: one record may be listing a Russian film and another – a Greek one. You can't apply the InfoView editing technique we have discussed above because there's no single appropriate Charset for the Title Text Box now. Record Styles to the rescue. In Alventis, set the Record Style of the Russian film record to use the Cyrillic Charset. Similarly, set the Greek film to use the Greek Charset, and so on. As you are navigating from one record to another, Alventis will apply the record's Style's Charset to the entire record, so you'll see its data in the proper alphabet.
Dynamic Charset Adjustments. In theory, the above should be sufficient. You may of course encounter records that have not been assigned a Style at all or one with a wrong Charset. To view and edit such records you can make temporary adjustments to the InfoView directly in Alventis. Click the Select Character Set button
The above description implied that some items may have explicitly-specified Charsets. This means that when the InfoView was created in Designer, the Charset of the item was explicitly set to some non-default value.
You can use the Select Character Set button for other Text Boxes or Combo Boxes in Alventis: just focus the Editor of interest and select the new Charset. This may be useful, for example, if you want to perform a search in the UniGrid, and you want to enter the search expression in Russian. Note that such Charset changes are not permanent and will be forgotten when the relevant form is closed.
Symbol Picker Effect. In Alventis (but not in Designer), whenever you use the Symbol Picker to enter a symbol or some text into a Text Box or a similar Editor, that Editor's Charset is automatically set to that of the symbol you are entering. For example, if you are entering a Greek letter into the UniGrid Search Box using the Symbol Picker, the Search Box's Charset will be set to Greek. If you want to reset the Editor to the original Charset, simply use the Dynamic Charset Adjustments technique described above.
Cut-and-Paste From Web Browsers. We regretfully admit that at present time there appears to be a problem with cutting and pasting international text from many Web browsers into Alventis. This is most likely to affect text in locales other than the default locale used by Windows. The problem is under investigation. Meanwhile, hold on for a twisted workaround that does seem to work. Example: you want to copy some Greek text from a Web page into a Text Box in an InfoView. At some point in time (before the following procedure or after – it doesn't matter), you must ensure the Text Box is set to the Greek Charset. Now, the procedure:
In closing, a little clarification for particularly inquisitive readers: as you may have figured out by now, Alventis does not support Unicode. The reason for this is that Alventis relies on a number of technologies of which only a tiny minority support Unicode. We feel that Alventis' Charset-based implementation provides a sufficiently powerful alternative that will satisfy your multi-lingual needs. |