【発明の詳細な説明】
コンピュータ・システム
本発明は、多言語機構を組み込んだコンピュータ・システム、ならびにコンピ
ュータ・システム内の多言語機構を動作させる方法に関する。
特に専門家以外の人へのコンピュータ・システムの普及により、多くのソフト
ウェア・パッケージを迅速かつ容易に使用するうえで、具体的にはソフトウェア
・パッケージの切替えを行ううえで、ユーザ・インタフェース(ウィンドウ環境
とも呼ばれる)がますます重要かつ貴重になっている。さらに、特にオペレーテ
ィング・システム用のものなど、多くのソフトウェア・パッケージは全世界的に
販売されており、表示文字を適切な言語で提供することが必要である。
適した言語または方言で表示文字を提供するというこの要件を達成する1つの
手法としては、ソース・コード内に複数の言語サブルーチンを用意しておく方法
がある。しかしながら、これにはコストのかかる多大なプログラミング時間が必
要であり、またそれによってソース・コード・プログラムが大きくなって扱いに
くくなり、エラーが発生する可能性が必然的に増大し、その結果エラーの検出や
訂正が困難になる。
また、どの言語が必要なのかを初期開発段階で予想することは困難であり、多
言語機能を限定することによって必要な先行投資的コストや開発時間を最小限に
抑えようとする動機となることは避けられない。ただしこれは、特に多くの言語
および/または方言から選択の幅を広くする必要がある場合、ソース・コード・
プログラム内に多言語機能を後で追加すると非常にコストがかかりがちであるこ
とを意味する。当然のことながら、この段階で多言語機能を追加するには、プロ
グラマはソース・コード・プログラムについて詳細な知識を備えている必要があ
り、またその機能のためのソフトウェアが正しい形式であることを保証する必要
がある。
本発明によれば、中央演算処理装置、および表示装置上に表示する文字を複数
の言語のいずれかで提供する多言語装置を含む多言語コンピュータ・システムで
あって、多言語装置が表示装置に入力される信号のフック要素に言語変更信号を
加える手段を含むことを特徴とするシステムが提供される。
また、以下の特徴の1つまたは複数を備えている。
ユーザ・インタフェース信号に入力される信号に言語変更信号を加える手段、
表示装置に入力される信号および/またはユーザ・インタフェース信号から言
語変更信号を除去する手段、
多言語装置が表示装置に入力される信号内および/またはユーザ・インタフェ
ース信号内のフックを利用すること、
多言語装置がCBTフック・プロシージャおよび/またはMsgProcフッ
ク・プロシージャを利用すること、かつ
総称的言語およびその言語の何らかの方言をそれぞれ格納する複数のデータ・
ストア。
このようにして、本発明は初期開発の後に大幅な変更を行うことなくソース・
コードに言語を追加する機能を組み込むことを可能にする。
本発明はまた、中央演算処理装置、および表示装置上に表示する文字を複数の
言語のいずれかで提供する多言語装置を含む多言語コンピュータ・システムを動
作させる方法であって、表示装置に入力される信号のフック要素に言語変更信号
を加えることを特徴とする方法も提供する。
本発明は、ユーザ・インタフェースを利用するいかなる形のコンピュータ・シ
ステムでの使用にも適するが、具体的には、例えば製造作業、加工作業、または
物質精製作業の監視および/または制御などの産業上の応用分野において使用さ
れるコンピュータ・システムに適用できる。
CBTフック・プロシージャは、エンド・ユーザが開発したソフトウェアの使
用方法を確認したり、アプリケーションの基本機能を実証したりするための一助
となるツールであり、ユーザーがアプリケーションの進歩した特徴や拡張機能に
ついて知ることができる。CBTフック・プロシージャは、ウィンドウの活動化
、作成、破棄、最小化、最大化、サイズ変更、または移動、システム・コマンド
の完了、システム・メッセージ待ち行列からのマウス事象またはキーボード事象
の除去、キーボード・フォーカスの設定、システム・メッセージ待ち行列との同
期
を含めて、多くの共通機能が完了する前にシステムによって呼び出される。
CBTフック・プロシージャでは、フックを登録した後は、アプリケーション
のウィンドウのライフ・サイクル中の様々な段階でフックを呼び出すことができ
る。CBTフックは、ライフ・サイクルの各フェーズごとに呼び出され、ウィン
ドウの現在の状態を示すメッセージが与えられる。言語機構は、当該のメッセー
ジ、すなわちHCTB−CREATWND(ウィンドウを作成する)、HCBT
_ACTIVATE(ウィンドウを描画する)、HCBT_DESTROYWN
D(ウィンドウを破棄する)にフック内部で応答する。
MsgProcフック・プロシージャは、その中では必要に応じてメッセージ
の割込み、検査、および修正は行われるが、廃棄は行われないアプリケーション
・メッセージ待ち行列に登録されるメッセージを監視するために使用されるツー
ルである。
本発明は、好ましくはCBTフックまたはMsgProcフックを使用するが
、その他のフックを使用することもできる。
従来技術の多言語機能では、こうしたフックは使用されない。
本発明はまた、中央演算処理装置、および表示装置上に表示する文字を複数の
言語のいずれかで提供する多言語装置を含む多言語コンピュータ・システムであ
って、多言語装置が表示装置に入力される信号に関連して言語変更信号を使用す
る手段を含み、多言語装置が表示装置に入力される信号から言語変更信号を除去
する手段を含むことを特徴とするシステムも提供する。
したがって、本発明はまた、中央演算処理装置、および表示装置上に表示する
文字を複数の言語のいずれかで提供する多言語装置を含む多言語コンピュータ・
システムを動作させる方法であって、表示装置に入力される信号に関連して言語
変更信号を使用することを含み、表示装置に入力される信号から言語変更信号を
除去することを特徴とする方法も提供することができる。
本発明をより容易に理解できるように、以下、本発明を組み込んだ多言語コン
ピュータ・システムの一部を概略的に示す唯一の添付図面を例示的なものとして
参照しながら説明する。
唯一の添付図面に、1000を超える異なる主要動作を有するパルプ化プロセ
スおよび製紙プロセスの制御用コンピュータ設備を示す。各操作は、例えば抄紙
機内の弁、モータ、ポンプなどの別個の動作に関連し、典型的な場合では抄紙機
は100を超える動作を有する。設備1は中央演算処理装置2を有しており、そ
の中央演算処理装置2は多くの感知位置からのデータや、それぞれ表示画面3を
含むいくつかのユーザ操作卓での命令の入力を受信する。説明を簡単にするため
に、図には表示画面3を1つのみ示す。
中央演算処理装置2は、設備1内で使用されるWindows NTオペレー
ティング・システムおよびその他のソフトウェア・パッケージを操作し、それら
すべてから出力される信号は、信号が必要に応じて適した処理のためにグラフィ
ック・カード5に渡され、次いで表示画面3に渡され、その結果そこにウィンド
ウが表示されるように、ユーザ・インタフェース装置4(UIU)によって処理
される。
多言語処理装置(MLPU)6は、特定の異なる言語にそれぞれ割り当てられ
たいくつかのデータ・ストア7を有しており、ユーザ・インタフェース装置4か
ら出力される信号(以下UI信号と呼ぶ)を監視する。MLPU 6は、別の言
語の要求を受信したり、文字を別の言語に変更して表示が作成され、表示されよ
うとしていることを確認したり(CBTフックの存在により)すると、該当する
データ・ストア7にアクセスし、次いで言語変更信号(以下LM信号と呼ぶ)を
UI信号のCBTフックに付加することにより、そのUI信号にLM信号を挿入
する。このようにして、UI信号は画面3に表示されるテキストが要求された言
語となるように変更される。MLPU 6は、UI信号のウィンドウ・ハンドル
(HWND)内の命令に従ってLM信号を付加し、次いでUI信号内のLM信号
が付加される最後の部分に後続のフックがあるかどうかをチェックする。ウィン
ドウ・ハンドルHWNDは、付加されたLM信号に対するサブクラス化ルーチン
を起動し、それによって必要な場合に最小限のソース・コードの変更で元のUI
信号を迅速かつ容易に復元できるようにするために使用される。
このようにして、画面3に表示される言語の変更は動作中、動的に処理される
ので、CPU 2がオペレーティング・システム・レベルで実施する動作を必要
としない。
変形形態では、MLPU 6は、CPU 2から出力される信号がUIU 4
に渡される前に、その信号にLM信号を挿入する。
MLPU 6は、次のようにメニュー用言語変更を処理する。UI信号のGe
tMsgフック内のメッセージWM_INITMENUまたはWM_MENUR
EFRESHを確認すると、MLPU 6はそのメニューのコマンド番号を使用
して(サブメニューやフィールドのコマンド番号はいずれも無視して)、そのメ
ニューの翻訳を求めて該当するストア7を探索し、そこからそのメニューの翻訳
を抽出する。ストア内にメニューの翻訳がない場合は、適切なLM信号を1つず
つ作成しなければならない。
より詳細な本発明の手順は、次のとおりである。
言語を変更して表示するウィンドウを準備する場合:
1)新しいウィンドウを作成しようとしているときに呼び出される、CPU 2
内のCBT基本単位を監視する。
2)そのウィンドウが言語変更を必要とするものかどうかをチェックする。
3)変更が必要ならば、後で使用するためにウィンドウ・コードに連鎖する。
4)CBTフックが正規の実行を続行できるようにする。
5)CBTが呼び出されてウィンドウが表示されるまで待機する。
6)ステップ3で連鎖したコードを使用可能にする。
7)言語変更を行う。
8)CBTフックが続行し、次のテキストを表示できるようにする。
表示後に、言語が変更されたウィンドウを処理する場合:
1)ウィンドウを破棄しようとしているときにCBTフックが呼び出されるのを
待機する。
2)先のステップ3で追加した連鎖コードを削除する。
従来、CBTフックの通常の用途は、何が起ころうとしているのかについて情
報をユーザに確実に伝達することであった。しかしながら、本発明では、単に事
象の監視という消極的な形のみではなく、フック・プロシージャを積極的な形で
利用し、それによって言語変更機能を実現する。
従来の多言語方法に対して本発明を特徴づけるのは、ウィンドウについて知る
ことなく追加の言語コードがプログラムに追加される点である。この重要な利点
は、コードが存在し、それがどこにあるかがわかっているので、ユーザが言語変
更を行う場合はこの新しい連鎖コードに直接指示を与え、それに応じてウィンド
ウのテキストの変更をいつでも透過的な形で強制的に行えることにある。
先に指摘したように、MLPU 6は、異なる言語(例えば英語、フランス語
、ドイツ語)のみならず、異なる方言(例えばイギリス英語とアメリカ英語、ヨ
ーロッパ・フランス語とカナダ・フランス語)へのテキストの変更やそれらの間
でのテキストの変更を行う働きをする。したがって、MLPU 6とデータ・ス
トア7の動作、およびそれらの相対的な構成は、言語/方言の選択ならびにそれ
らの切替えが容易かつ円滑に行われるように設計される。すなわち、1つのデー
タ・ストア7には、単一の総称的言語の異なる方言(例えばイギリス英語とアメ
リカ英語)に関する情報が格納され、異なる総称的言語(例えば英語とフランス
語)は異なるストア内に格納される。ユーザがMLPU 6が能力を備えていな
い方言(例えばブラジル・スペイン語)を要求すると、総称的言語(すなわち、
この例ではヨーロッパ・スペイン語)が提供され、その総称的言語が用意されて
いない場合は、アメリカ英語が提供される。MLPU 6には、例えば同じ言語
のある方言から別の方言(例えばケージャン・フランス語からカナダ・フランス
語へ)、ある方言から別の総称的言語(例えばブラジル・スペイン語から英語へ
)、別の総称的言語のある方言から別の方言(例えばカナダ・フランス語からイ
ギリス英語へ)など、様々なシーケンスを実行するよう指示することができる。
MLPU 6にはまた、例えばポルトガル語が要求されたものの、それが用意さ
れていない場合はヨーロッパ・スペイン語(通常提供されるアメリカ英語ではな
く)を提供するという具合に、用意されていない特定の総称的言語が要求された
場合に特定の代替言語(または方言)を提供するよう指示することもできる。M
LPU 6が、例えば英字、ギリシア文字、ロシア文字、ヘブライ文字、アラビ
ア文字、日本語文字、中国文字を含めて、すべて文字による言語用のLM信号を
提供できることは明らかである。
本発明の設備1は、CBTフックの他および/またはCBTフックの代替とし
て、MsgProcフックを使用することもできる。
MsgProcフック・プロシージャは、GetMessage関数がアプリ
ケーション・メッセージ待ち行列からメッセージを取り出すと必ずシステムによ
って呼び出される、アプリケーション定義またはライブラリ定義のコールバック
関数である。システムは、取り出したメッセージを宛先のウィンドウ・プロシー
ジャに渡す前に、そのメッセージをフック・プロシージャに渡す。
MsgProcフック・プロシージャは、メッセージの検査または修正を行う
ことができる。フック・プロシージャがシステムに制御を戻すと、GetMes
sage関数はそのメッセージを修正内容と共に、それを元々呼び出したアプリ
ケーションに返す。
アプリケーションは、SetWindowsHookEx関数呼出しの際にW
H−GETMESSAGEフック・タイプとフック・プロシージャのアドレスを
指定することにより、このフック・プロシージャを登録する。
MsgProcは、アプリケーション定義またはライブラリ定義の関数名のプ
レースホルダである。DETAILED DESCRIPTION OF THE INVENTION Computer System The present invention relates to a computer system incorporating multilingual features, and a method of operating a multilingual feature within a computer system. In particular, due to the spread of computer systems to non-experts, the user interface (window environment) for quickly and easily using many software packages, and specifically for switching software packages. (Also called)) are becoming more important and valuable. In addition, many software packages are sold worldwide, especially for operating systems, and require that display characters be provided in the appropriate language. One way to achieve this requirement of providing display characters in a suitable language or dialect is to have multiple language subroutines in the source code. However, this requires enormous and costly programming time, which makes the source code program large and cumbersome, and inevitably increases the likelihood of errors, thereby resulting in errors. It becomes difficult to detect and correct. In addition, it is difficult to predict which language is needed at the initial development stage, and it will be a motivation to minimize necessary up-front costs and development time by limiting multilingual functions. Is inevitable. However, this means that adding multilingual features later in your source code program can be very costly, especially if you need to choose from many languages and / or dialects. I do. Of course, adding multilingual features at this stage requires that the programmer have detailed knowledge of the source code program and that the software for that feature is well-formed. Need to guarantee. According to the present invention, there is provided a multi-language computer system including a central processing unit and a multi-language device for providing characters to be displayed on a display device in any of a plurality of languages, wherein the multi-language device is connected to the display device. A system is provided comprising means for applying a language change signal to a hook element of an incoming signal. In addition, one or more of the following features are provided. Means for adding a language change signal to the signal input to the user interface signal; means for removing the language change signal from the signal input to the display device and / or the user interface signal; the multilingual device being input to the display device Utilizing hooks in signals and / or user interface signals; multilingual devices utilizing CBT hook procedures and / or MsgProc hook procedures; and storing a generic language and some dialects of that language, respectively. Multiple data stores. In this way, the invention makes it possible to incorporate the ability to add languages to the source code without significant changes after the initial development. The present invention is also a method of operating a multi-lingual computer system including a central processing unit and a multi-lingual device for providing characters to be displayed on a display device in any of a plurality of languages, the method comprising: A method is also provided, characterized in that a language change signal is added to a hook element of the signal to be transmitted. The present invention is suitable for use in any form of computer system that utilizes a user interface, but is specifically intended for use in industrial, e.g., monitoring and / or controlling, manufacturing, processing, or material refining operations. Applicable to computer systems used in the application fields of The CBT hook procedure is a tool that helps end-users verify how to use the software they have developed and demonstrate the basic functionality of the application. You can know. The CBT hook procedure activates, creates, destroys, minimizes, maximizes, resizes or moves windows, completes system commands, removes mouse or keyboard events from the system message queue, Called by the system before many common functions are completed, including setting focus and synchronizing with the system message queue. After registering the hook, the CBT hook procedure can invoke the hook at various stages during the life cycle of the application's window. The CBT hook is called for each phase of the life cycle and is given a message indicating the current state of the window. The language mechanism responds inside the hook to such messages: HCTB-CREATWND (create window), HCBT_ACTIVATE (draw window), HCBT_DESTROYWND (destroy window). The MsgProc hook procedure is a tool used to monitor messages enqueued in an application message queue in which messages are interrupted, inspected, and modified as needed, but not discarded. It is. The present invention preferably uses CBT hooks or MsgProc hooks, but other hooks can be used. Prior art multilingual features do not use such hooks. The present invention is also a multilingual computer system including a central processing unit, and a multilingual device for providing characters to be displayed on a display device in any of a plurality of languages, the multilingual device being input to the display device. There is also provided a system including means for using the language change signal in connection with the signal to be provided, wherein the multilingual device includes means for removing the language change signal from the signal input to the display device. Accordingly, the present invention is also a method of operating a multilingual computer system including a central processing unit and a multilingual device that provides characters to be displayed on a display device in any of a plurality of languages, comprising: A method may also be provided that includes using a language change signal in connection with a signal input to the display device, the method comprising removing the language change signal from a signal input to the display device. BRIEF DESCRIPTION OF THE DRAWINGS In order that the present invention may be more readily understood, the following description will be made by way of example only with reference to the accompanying drawings, which schematically show a part of a multilingual computer system incorporating the present invention. The only accompanying drawings show computer equipment for controlling a pulping process and a papermaking process having more than 1000 different primary operations. Each operation involves separate operations, such as valves, motors, pumps, etc. in the paper machine, and typically the paper machine has more than 100 operations. The equipment 1 has a central processing unit 2 which receives data from a number of sensing locations and inputs commands at several user consoles, each including a display screen 3. . For simplicity, only one display screen 3 is shown in the figure. The central processing unit 2 operates the Windows NT operating system and other software packages used in the facility 1, and the signals output from all of them are processed so that the signals can be appropriately processed as needed. It is passed to the graphic card 5 and then to the display screen 3 where it is processed by the user interface unit 4 (UIU) so that a window is displayed there. The multilingual processing unit (MLPU) 6 has several data stores 7 respectively assigned to specific different languages, and outputs a signal (hereinafter referred to as a UI signal) output from the user interface device 4. Monitor. When the MLPU 6 receives a request in another language, or confirms that a display has been created and is about to be displayed by changing characters to another language (due to the presence of the CBT hook), the corresponding data is received. Access the store 7 and then insert the LM signal into the UI signal by adding a language change signal (hereinafter referred to as the LM signal) to the UI signal CBT hook. In this way, the UI signal is changed so that the text displayed on screen 3 is in the requested language. The MLPU 6 appends the LM signal according to instructions in the window handle (HWND) of the UI signal, and then checks if there is a subsequent hook in the last part of the UI signal where the LM signal is appended. The window handle HWND invokes a subclassing routine for the appended LM signal, so that the original UI signal can be quickly and easily restored when necessary with minimal source code changes. used. In this way, the change of the language displayed on the screen 3 is dynamically processed during the operation, so that the operation performed by the CPU 2 at the operating system level is not required. In a variant, the MLPU 6 inserts an LM signal into the signal output from the CPU 2 before it is passed to the UIU 4. The MLPU 6 processes the menu language change as follows. Upon seeing the message WM_INITMENU or WM_MENU EFRESH in the GetMsg hook of the UI signal, the MLPU 6 uses the command number of the menu (ignoring any command numbers of submenus and fields) to translate the menu. The corresponding store 7 is searched for and the translation of the menu is extracted therefrom. If there is no menu translation in the store, the appropriate LM signals must be created one by one. The more detailed procedure of the present invention is as follows. When preparing a window to be displayed by changing the language: 1) Monitor the basic CBT unit in the CPU 2 which is called when a new window is to be created. 2) Check if the window needs language change. 3) If changes are needed, chain to window code for later use. 4) Allow the CBT hook to continue normal execution. 5) Wait until the CBT is called and the window is displayed. 6) Make the code chained in step 3 usable. 7) Change the language. 8) Allow the CBT hook to continue and display the next text. To process a window whose language has been changed after display: 1) Wait for the CBT hook to be called while trying to destroy the window. 2) Delete the chain code added in step 3 above. In the past, a common use of CBT hooks has been to reliably communicate information to the user about what is going to happen. However, in the present invention, not only the passive form of event monitoring but also the hook procedure is used in an active manner, thereby implementing a language change function. What distinguishes the present invention over conventional multilingual methods is that additional language codes are added to the program without knowing about the window. The important advantage of this is that because the code exists and knows where it is, if the user makes a language change, it will give direct instructions to this new chained code, and will always change the text in the window accordingly. That it can be forced into a transparent form. As pointed out earlier, MLPU 6 is not only capable of changing text into different languages (eg, English, French, German) but also different dialects (eg, British and American English, European and Canadian French), It serves to change the text between them. Thus, the operation of the MLPU 6 and the data store 7, and their relative configuration, are designed so that the selection of languages / dialects and their switching can be performed easily and smoothly. That is, one data store 7 stores information about different dialects of a single generic language (eg, British English and American English), and different generic languages (eg, English and French) are stored in different stores. Is done. If the user requests a dialect for which MLPU 6 does not have the capability (eg Brazilian Spanish), a generic language (ie, European Spanish in this example) is provided, and the generic language is not available Is provided in American English. MLPU 6 includes, for example, one dialect of the same language from another dialect (eg, Cajun French to Canadian French), one dialect to another generic language (eg, Brazilian Spanish to English), another generic A variety of sequences can be instructed to execute, from one dialect of the language to another (for example, from Canadian French to British English). MLPU 6 also provides certain non-available languages, for example, where Portuguese is required but not available, providing European Spanish (rather than the normally provided American English). It can also indicate that a specific alternative language (or dialect) be provided if a generic language is required. Obviously, the MLPU 6 can provide LM signals for all textual languages, including, for example, English, Greek, Russian, Hebrew, Arabic, Japanese, Chinese. The facility 1 of the present invention may also use the MsgProc hook in addition to and / or as an alternative to the CBT hook. The MsgProc hook procedure is an application-defined or library-defined callback function that is called by the system whenever the GetMessage function retrieves a message from the application message queue. The system passes the retrieved message to the hook procedure before passing it to the destination window procedure. The MsgProc hook procedure can inspect or modify the message. When the hook procedure returns control to the system, the GetMessageSage function returns the message with the modifications to the application that originally called it. The application registers this hook procedure by specifying the WH-GETMESSAGE hook type and the address of the hook procedure when calling the SetWindowsHookEx function. MsgProc is a placeholder for an application-defined or library-defined function name.