The present invention relates, generally, to the field of apparatuses and methods for displaying text messages in a computer system user interface and, more specifically, to apparatuses and methods for displaying dialog box text messages including languages having different reading orders in a computer system user interface.
Today, computer systems are used around the world and, as a consequence, computer systems must be capable of displaying textual messages to computer system users in many different languages or scripts. Traditionally, the display of textual messages to users has been enabled by requiring a computer system's user to select a language or script in which text, including the textual messages presented to the user via dialog boxes of a computer system user interface, is to be displayed to the user by the computer system. Unfortunately, the selection of a language, or script generally, establishes the reading order and text alignment to be employed by a computer system when displaying all textual messages. As a consequence, if the computer system is to display a textual message including text from multiple languages or scripts that have different reading orders, only the text in a language or script having a reading order identical to that of the language or script selected by the user will be displayed in a readable manner.
For example, in the English language, text is left-aligned and is read in a left-to-right reading order. In the Hebrew language, text is right-aligned and is read in a right-to-left reading order. When a computer system must display a text message including text from languages or scripts having different alignments and different reading orders such as English and Hebrew in a dialog box of a computer system user interface and the computer system is set to one of languages or scripts, the text including the language or script to which the computer system is set will be displayed in a readable manner with correct alignment and reading order, but the text from the other language or script will be displayed in an unreadable manner with incorrect alignment and reading order.
Therefore, there exists in the industry, a need for an apparatus and methods for displaying text messages in dialog boxes of a computer system user interface including text from languages or scripts having different alignment and different reading orders in a readable manner, and that addresses these and other shortcomings or difficulties which exist now or in the future.
Broadly described, the present invention comprises an apparatus and methods for displaying a text message including languages or scripts having different alignment and different reading orders in a readable manner. More particularly, the present invention comprises an apparatus and methods for displaying a mixed language text message in a dialog box of a computer system user interface in a readable manner. The apparatus includes computer software, which when executed by a computer system, cause the computer system to perform methods which include, in an exemplary embodiment, determining an appropriate reading order for each sentence of a mixed language text message by detecting and evaluating at least one character of each sentence of the message to ascertain (i) the language or script to which the at least one character belongs and (ii) the reading order of such language or script. In performing such an evaluation, each successive character of a sentence's plurality of characters is considered to locate a first alphabetic character and, upon locating a first alphabetic character, the language or script to which such first alphabetic character belongs is ascertained and, hence, the reading order of that alphabetic character is also ascertained. The reading order of the alphabetic character is then employed to display the sentence of the mixed language text message in the dialog box of the computer system user interface. Such evaluation and determination of the reading order is repeated for each sentence of a mixed language text message prior to the display of each sentence in the dialog box of the computer system user interface.
The apparatus and methods of the present invention further include, in the exemplary embodiment, computer software which causes the computer system to perform methods that determine an appropriate alignment for the mixed language text message when the computer software is executed by the computer system. Such a determination includes ascertaining the alignment of the language or script otherwise employed by the computer system user interface to display text. The determined reading order and alignment are then used to display the mixed language text message in the dialog box of the computer system user interface.
Advantageously, the apparatus and methods of the present invention enable a computer system to display a text message comprising text having more than one language or script in a readable manner. For example, the apparatuses and methods enable a text message having text from a language such as the English language which is written and/or read in the left-to-right direction and text from a language such as the Hebrew language which is written and/or read in the right-to-left direction to be displayed in a dialog box in a readable manner by determining an appropriate alignment for the text message and an appropriate reading order for each sentence thereof. If such alignment and reading order(s) were not determined and utilized, the text message may include at least a portion that is unreadable.
Other advantages and benefits of the present invention will become apparent upon reading and understanding the present specification when taken in conjunction with the appended drawings.
Referring now the drawings in which like numerals represent like elements or steps throughout the several views,
The dialog box display routine 100 may be, as illustrated in
The operating system program 102 includes a reading order setting 108 or other similar setting which is, generally, stored during operation of the computer system 210 in system memory 230 such that the then current reading order setting 108 is accessible to the operating system program 102 and/or the application programs 104. The reading order setting 108 comprises a setting utilized by the operating system program 102 to determine the alignment and order of words that it is to use when causing the computer system 210 to display text to a user via a monitor 291 or other display device. Generally, the reading order setting 108 is selected by a user of the computer system 210 when the user selects and identifies to the computer system 210 during set-up thereof, a primary language, or script, that the computer system 210 is to employ when displaying text to the user. For example and not limitation, when a user selects and identifies the English language as a primary language for the computer system 210 to use, the selection of the English language and the setting established thereby informs the computer system 210 that it is to display text using a left alignment with the reading order of the words being left-to-right (i.e., since, in the English language, the first words of sentences and paragraphs are aligned at the left side of a document and the remaining words of sentences are written and/or read in a direction from left-to-right). Alternately, when a user selects and identifies the Hebrew language as a primary language for the computer system 210 to use, the selection of the Hebrew language and the setting established thereby informs the computer system 210 that it is to display text using a right alignment with the reading order of the words being right-to-left (i.e., since, in the Hebrew language, the first words of sentences and paragraphs are aligned at the right side of a document and the remaining words of sentences are written and/or read in a direction from right-to-left).
In most past and present versions of the Microsoft® Windows operating system program, for instance, the reading order setting corresponds to a code page number that is selected and identified during the set-up of a computer system 210 utilizing the Microsoft® Windows operating system program. The code page number, generally, is associated with and identifies a language and a code page comprising a character set including a plurality of alphanumeric, punctuation, and special characters of a language or script. In so identifying the language, the code page number also establishes the alignment and reading order to be used by the computer system 210 when displaying text. It should be understood, however, that with respect to the scope of the present invention, the term “reading order setting” includes one or more settings or stored values that may, alone or in combination, define the alignment and reading order that a computer system is to employ when displaying text.
Hence, it should be understood that the present invention is operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well-known computing systems, environments, and/or configurations that may be appropriate or suitable for use as a computer system of the present invention include, but are not limited to, personal computers, server computers, hand-held or laptop devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
The present invention may also be described in the general context of comprising computer-executable instructions, such as program modules, being executed by a computer system. Generally, program modules include routines, programs, programming, objects, components, data, data structures, etc. that perform particular tasks or implement particular abstract data types. The present invention may be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media, including, without limitation, in memory storage devices.
With reference to
Computer system 210 typically includes a variety of computer-readable media. Computer-readable media may comprise any available media that can be accessed by, read from, or written to by computer system 210 and may include both volatile and nonvolatile, removable and non-removable media. By way of example, and not limitation, computer-readable media may comprise computer storage media and communication media. Computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data, data structures, program modules, programs, programming, or routines. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, magneto- optical storage devices, or any other medium which can be used to store the desired information and which can be accessed by computer system 210. Communication media typically embodies computer-readable instructions, data, data structures, program modules, programs, programming, or routines in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. The term “modulated data signal” means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, RF, infrared and other wireless media. Combinations of any of the above are also included within the scope of computer-readable media.
The system memory 230 includes computer storage media in the form of volatile and/or nonvolatile memory such as read only memory (ROM) 231 and random access memory (RAM) 232. A basic input/output system 233 (BIOS), containing the basic routines that help to transfer information between elements within computer 210, such as during start-up, is typically stored in ROM 231. RAM 232 typically stores data and/or program instructions that are immediately accessible to and/or presently being operated on by processing unit 220. By way of example, and not limitation,
The computer 210 may also include other removable/non-removable, volatile/nonvolatile computer storage media. By way of example only,
The drives 241, 251, 255 and their associated computer storage media discussed above and illustrated in
The computer system 210 may operate in a networked environment using logical bi-directional communication connection links to one or more remote computer systems, such as a remote computer system 280. The remote computer system 280 may be a personal computer, a server, a router, a network PC, a peer device or other common network node, and typically includes many or all of the elements described above relative to the computer system 210, although only a memory storage device 281 of remote computer system 280 has been illustrated in
When communicatively connected to a LAN 271, the computer system 210 connects to the LAN 271 through a network interface or adapter 270. When communicatively connected to a WAN 273, the computer system 210 typically includes a modem 272 or other means for establishing a communication link over the WAN 273, such as the Internet. The modem 272, which may be internal or external, may be connected to the system bus 221 via the user input interface 260, or other appropriate mechanism. In a networked environment, program modules depicted relative to the computer system 210, or portions thereof, may be stored in the remote memory storage device 281. By way of example, and not limitation,
Next, at step 308, the text alignment for the display of the mixed language text message is set to be the same as the text alignment of the operating system program 102. Then, at step 310, method 300 enters a loop of steps (i.e., including steps 310, 312, and 314) that are performed for each sentence present in the mixed language text message. At step 310, a determination is made as to whether the last sentence of the mixed language text message has already been displayed in the dialog box. If not, the reading order for display of the next sentence of the mixed language text message is determined and set, or established, for the next sentence in accordance with method 400 (described below) at step 312. It should be noted that the term “next sentence” refers to the first sentence of the mixed language text message on the first pass through the loop or to a sequentially subsequent sentence of the mixed language text message on a respective subsequent pass through the loop. If, at step 310, it is determined that the last sentence of the mixed language text message has already been displayed in the dialog box on the monitor 291 or other display device, the method 300 ends at step 316 with each sentence of the mixed language text message having been displayed in the dialog box in a readable manner.
Once the reading order of the next sentence of the mixed language text message has been established at step 312, the next sentence of the mixed language text message is displayed in the dialog box on the monitor 291 or other display device at step 314 using the text alignment and reading order of the next sentence as established and described above, and overriding the reading order setting 108 or other similar setting or settings of the operating system program 102. After display of the next sentence at step 314, method 300 loops back to step 310 where, once again, a determination is made as to whether the last sentence of the mixed language text message has already been displayed in the dialog box.
Continuing at step 408 of method 400, if the first character of the sentence text was determined to be a strong character of a particular language or script at step 406, the method 400 branches to step 410 where the reading order for the sentence is determined based upon the first character and the language or script to which the first character belongs. Next, at step 412, the reading order for the sentence is set, or established, to be the reading order for the first character. At step 414, method 400 ends and returns to method 300 with the reading order for the sentence having been set or established.
If, at step 408, it is ascertained that the first character of the sentence text is not a strong character (i.e., the first character is, instead, a weak character), the method 400 proceeds to step 416 where a loop of steps (i.e., including steps 418, 420, 422, and 424) is entered into that are performed for each of the remaining one or more characters of the sentence text until a strong character is detected or until all remaining characters are examined for the existence of a strong character. At step 416, a test is made to determine whether the last character of the sentence text has already been considered while attempting to locate a strong character in the sentence text. If the last character has not already been considered, the “next character” of the sentence text is examined and a determination is made, at step 418, as to whether the next character comprises a strong character or a weak character. As used herein, the term “next character” refers to a sequentially subsequent character of the sentence text that is individually examined on a respective subsequent pass through the loop.
Next, at step 420, a decision is made as to whether the next character of the sentence text was determined to be a strong character of a particular language or script at step 418. If so, the method 400 branches to step 422 where the reading order for the sentence is determined based upon the next character and the language or script to which the next character belongs. Then, at step 424, the reading order for the sentence is set, or established, to be the reading order for the next character (i.e., the reading order of the language or script to which the next character belongs). At step 426, method 400 ends and returns to method 300 with the reading order for the sentence having been set or established. If, at step 420, it is decided that the next character of the sentence text is not a strong character (i.e., but is, instead, a weak character), the method 400 branches back to step 416 where a determination is once again made as to whether the last character of the sentence text has been considered.
If a decision is made, at step 416, that the last character of the sentence text has been examined for the presence of a strong character, then no strong character exists in the sentence text and the method 400 proceeds to step 428 where a determination is made as to whether a reading order has been established for the paragraph in which the sentence is present. If a reading order has already been established for the paragraph, then the reading order for the sentence is set to the already existing reading order of the paragraph at step 430. Then, the method 400 ends at step 432 and returns to method 300 with the reading order for the sentence having been set or established.
If, at step 428, it is determined that a reading order has not already been established for the paragraph in which the sentence is present, the method 400 advances to step 434 where it is ascertained whether the sentence is the first sentence of the text message. If not, the reading order for the sentence is set, or established, to be the reading order for the first sentence of the text message at step 436. Then, the method 400 ends and returns to method 300 at step 438 with the reading order for the sentence having been set or established. If it is ascertained, at step 434, that the sentence is the first sentence of the text message, the reading order for the sentence is set, or established, at step 440 to be the same as the reading order of the operating system program 102 by examining the reading order setting 108 or other similar setting or settings of the operating system program 102, alone or in combination, to ascertain whether the operating system program 102 has been set-up to display text with a left-to-right reading order or with a right-to-left reading order. Subsequently, the method 400 ends and returns to method 300 at step 442 with the reading order for the sentence having been set or established.
Whereas the present invention has been described in detail above with respect to an exemplary embodiment thereof, it is understood that variations and modifications can be effected within the spirit and scope of the invention, as described herein before and as defined in the appended claims.