Newsletters - MATLAB Digest
MATLAB 5.3 (Release 11) for Windows is localized for Japan.
by Rob Henson
MATLAB 5.3 is fully localized for Japanese Windows users. The whole of MATLAB, from the installation to the new Plot Editing tools, is in Japanese when used on the Japanese versions of Microsoft Windows 95, 98, and NT. Menus, online help, and most error messages are in Japanese. String variables and string manipulation functions, where appropriate, can handle Japanese text data. Of course, there are Japanese manuals online and in printed form. It is important to note that this is not a separate version of MATLAB. The executable and all of the M-files are the same worldwide - just the language used for the user interface is different. This is achieved by automatically selecting different resources for the language dependent components.
|
Figure 1. The Japanese Command Window, M-file, help and the File menu from a Figure window. Click to enlarge image. |
In addition to creating the Japanese user interface, we also improved the internal handling and graphical display of characters so that all of the new features of MATLAB 5.3 support Japanese characters. For example, it is now easy to create figure plots with Japanese annotation using the new Plot Editing tools.
|
Figure 2. A Plot with Japanese titles, axes labels and annotation. Click on image to see enlarged view. |
Even though the Japanese version of MATLAB uses the same executable as the English version and all of the M-files are also the same, Japanese users will see Japanese help and Japanese error messages generated from these M-files. This is acheived by using an overloading technique similar to the one used by MATLAB objects. No special commands are required to enable this in an M-file.
Creating internationally portable GUIs
The only real problem with creating GUIs for use in Japan is the specification of fonts. Standard fonts such as Courier and Helvetica do not support Japanese characters. So we recommend that if you are creating a GUI that might be used in languages other than your own, you should set the fontname based on the default fontname properties of Handle Graphics (defaultUicontrolFontName, defaultTextFontName, defaultAxesFontName
For example:
theFont = get(0,'defaultUicontrolFontName');
h=uicontrol('style','edit','fontname',theFont);
These default fontnames can be set in matlabrc.m or startup.m using a command like this:
set(0,'defaultUicontrolFontName','SomeFont');
On Japanese machines these default to MS Gothic.
If you want to ensure that the font is a fixed width font then use the fontname FixedWidth. This can be used anywhere that a normal fontname is used, and it is guaranteed to be a fixed width font on all language operating systems.
For example:
h=uicontrol('style','edit','fontname','FixedWidth');
The name of the actual font that will be used can be accessed using get(0,'FixedWidthFontName'). On most language machines this will return Courier. On Japanese machines these default to the system GUI font, which is usually MS Gothic.
Restrictions of localized MATLAB
There are some language restrictions in the Japanese version of MATLAB. For example, Japanese variable names and Japanese function names are not allowed. This decision was made to keep the MATLAB language as platform independent and portable as possible. Also, it is not possible to display Japanese text in MATLAB on non-Japanese machines.
