Application programs are often provided in different versions that are localized for different languages. For instance, an office application suite might be provided in different versions localized for English, Chinese, and other languages. While localized application programs are often provided in this manner, application programs typically do not support temporary translation of their user interface into other languages.
Temporary translation of an application program user interface might be desirable, for instance, to an English-speaking auditor that has traveled to China to audit some spreadsheet documents. If the only available version of the spreadsheet application program for editing the documents is a Chinese language version, then the auditor might not be able to navigate the features of the application because he or she does not understand the language. In this situation, the auditor might have to purchase and install an English language version of the spreadsheet application.
Some users might also be required to utilize an application program in a language dictated by someone else. For instance, an employer might only purchase application programs in one language. Multi-lingual users that do not easily understand the work language dictated by their employer might have difficulty utilizing the application programs.
In another scenario, an application program might not be available in a version localized to a particular language. For instance, if a word processing application program is not available in a version that has been localized for Lithuania, users in that country might instead utilize an English or Russian language version. These users might, however, have difficulty in utilizing an application program that has not been localized for their native language.
It is with respect to these and other considerations that the disclosure presented herein has been made.
Concepts and technologies are described herein for dynamic screentip language translation. According to embodiments presented herein, aspects of a user interface provided by an application program can be temporarily and dynamically translated from a source language to a specified target language. For instance, text shown in a screentip associated with a user interface item could be dynamically translated from Chinese to English at runtime. A screentip is text that is displayed temporarily while a user interface cursor is hovering over a user interface item, such as an icon or button. The term screentip as utilized herein encompasses tooltips and supertips. Supertips are screentips that can include multiple text strings and graphics. A screentip containing translated text can also be dynamically generated for a user interface item that includes text but that does not otherwise have an associated screentip. Through the use of this mechanism, a user can temporarily view translated text regarding user interface items provided by an application without the need to purchase a version of the application localized for another language.
According to one embodiment, translated user interface text strings are provided by displaying a screentip on a display screen of a computer. Hovering refers to a process of placing a user interface cursor over a user interface item without performing a selection action, such as a mouse click. When the user interface cursor is moved away from the user interface item, the display of the screentip is removed from the display screen.
According to other aspects of the embodiments presented herein, a determination is made as to whether a user interface cursor is hovering over a user interface item. If so, a determination is made as to whether the user interface item has an associated screentip. If the user interface item has an associated screentip, text associated with the screentip is identified, a translated text string is located for the text string, and the translated text string is displayed in the screentip. If the user interface item does not have an associated screentip, a determination is made as to whether the user interface item contains a text string. If so, a determination is made as to whether a translated text string is available that corresponds to the text in the user interface item. If so, the translated text string is displayed in a newly generated screentip for the user interface item.
According to another aspect, a translated text string may be located for a given text string by performing a hash operation on the text string to generate a hash value. The hash value is then utilized as an index into a first file, referred to herein as a source language index file, to locate a unique identifier for the text string. The unique identifier is then utilized as an index into a second file, referred to herein as a target language string file, to locate the translated text string. Source language index files and target language string files can be provided per application or parts of an application and per language. In one embodiment, the application that generated a text string is identified and only the source language index file and the target language string file for that application and the desired source and target languages are loaded into the main memory of a computer system.
According to another aspect, multiple unique identifiers may be located in the source language index file for a given text string. In this case, runtime metadata and metadata stored in the source language index file can be utilized to select the unique identifier to be utilized as the index into the target language string file. This may be helpful, for instance, when a single text string has multiple translated text strings.
According to another aspect, a text string, referred to herein as a compound text string, is formed from two or more text strings, referred to herein as component text strings. A cache is maintained when compound text strings are displayed that identifies the compound text string and its component text strings. In order to provide a translation of a compound text string, the compound text string and its component text strings are located in the cache. For each of the component text strings, a hash value is generated, the hash value is utilized to locate a unique identifier for the component text string in the source language index file, and the unique identifier is utilized to locate the translated text string in the target language string file. The translated text strings for each of the component strings are then concatenated to form a translated text string for the compound text string that can be displayed in a screentip. In one implementation, the cache is stored on disk for use in distribution to other users or to the manufacturer of the application.
According to another aspect, a timer is utilized to trigger a periodic determination as to whether a translation should be performed. If modality is detected in an application program, such as when a modal dialog box is being displayed, the duration of the timer is reduced. When the modality ceases, such as when the dialog box is dismissed, the timer is restored to its original duration.
It should be appreciated that the above-described subject matter may also be implemented as a computer-controlled apparatus, a computer process, a computing system, as an article of manufacture such as a computer readable storage medium, or in another manner. These and various other features will be apparent from a reading of the following Detailed Description and a review of the associated drawings.
This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended that this Summary be used to limit the scope of the claimed subject matter. Furthermore, the claimed subject matter is not limited to implementations that solve any or all disadvantages noted in any part of this disclosure.
The following detailed description is directed to technologies for dynamic screentip language translation. While the subject matter described herein is presented in the general context of program modules that execute in conjunction with the execution of an operating system and application programs on a computer system, those skilled in the art will recognize that other implementations may be performed in combination with other types of program modules. Generally, program modules include routines, programs, components, data structures, and other types of structures that perform particular tasks or implement particular abstract data types. Moreover, those skilled in the art will appreciate that the subject matter described herein may be practiced with other computer system configurations, including hand-held devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, minicomputers, mainframe computers, and the like.
In the following detailed description, references are made to the accompanying drawings that form a part hereof, and which are shown by way of illustration specific embodiments or examples. Referring now to the drawings, in which like numerals represent like elements throughout the several figures, concepts and technologies for dynamic screentip language translation will be described.
Turning now to
As will be described in greater detail below, the MIST module 102 is configured in embodiments to dynamically translate aspects of a user interface provided by the applications 104A-104C from a source language to a specified target language. For instance, as mentioned above, text shown by the applications 104A-104C in Chinese could be dynamically translated by the MIST module 102 to English at runtime.
In one particular embodiment, the MIST module 102 is configured to determine whether a user interface cursor, such as a mouse cursor, is hovering over a user interface item displayed by one of the applications 104A-104C. If so, the MIST module 102 is further configured to determine whether the user interface item has an associated screentip. As discussed briefly above, a screentip is text that is displayed temporarily while a user interface cursor is hovering over a user interface item, such as an icon or button. As utilized herein, the term hovering refers to a process of placing a user interface cursor over a user interface item without performing a selection action, such as a mouse click. When the user interface cursor is moved away from the user interface item, the display of the screentip is removed from the display screen. It should be appreciated that the term screentip as utilized herein encompasses tooltips and supertips. Supertips are screentips that can include multiple text strings and graphics.
If the MIST module 102 determines that a user interface cursor is hovering over a user interface item and that the item has an associated screentip, the MIST module 102 is configured to identify the text associated with the screentip, locate a translated text string for the text string in the screentip, and to display the located translated text string in the screentip. If the MIST module 102 determines that the user interface item does not have an associated screentip, the MIST module 102 will determine whether the user interface item contains a text string. If the MIST module 102 determines that the user interface item contains a text string, the MIST module 102 will attempt to locate a translated text string for the text string in the user interface item and display the translated text string in a screentip for the user interface item. Additional details regarding these processes and others performed by the MIST module 102 will be described in greater detail below with respect to
As also illustrated in
It should be appreciated that, according to embodiments, the source language index file 106 and the target language string file 108 may be provided on a per language and per application basis. For instance, a separate source language index file 106 may be provided for each of the applications 104A-104C in each language supported by the applications 104A-104C. As will be described in greater detail below, the version of the source language index file 106 for each application 104A-104C contains information for the strings displayed by the particular applications 104A-104C. This allows the size of the source language index file 106 to be kept to a minimum while still allowing the text strings displayed by each of the applications 104A-104C to be dynamically translated at runtime. Similarly, different versions of the target language string file 108 may be provided for each of the applications 104A-104C for each of the target languages to which text strings displayed by the applications 104A-104C may be translated. This allows the target language string file 108 to also be kept to a minimum size while still supporting the translation of many of the strings displayed by each of the applications 104A-104C at runtime. Additional details regarding the structure and usage of the source language index file 106 and the target language string file 108 will be provided below with respect to
Turning now to
According to aspects presented herein, the MIST module 102 is configured to provide functionality for translating the text 206A of a screentip 204A to a specified target language. In this regard, the MIST module 102 is configured to determine whether a user interface item 200A over which a user interface cursor 202 is hovering has an associated screentip 204A. If so, the MIST module 102 is configured to identify translated text 208A for the text 206A that would ordinarily be displayed in the screentip 204A. If translated text 208A is located, the MIST module 102 is configured to cause the translated text 208A to be displayed in the screentip 204A in place of the text 206A. This is illustrated in
According to other aspects, the MIST module 102 is also configured to display a screentip 204B for a user interface item 200B that does not otherwise have a screentip associated therewith. This process is illustrated in
The routine 300 begins at operation 302, where a determination is made as to whether a user interface cursor 202 is hovering over a user interface item 200. If not, the routine 300 proceeds back to operation 302 where another such determination is made. As will be discussed in greater detail below, a timer may be utilized to trigger the frequency of determination as to whether a user interface cursor is hovering over a user interface item. If the user interface cursor is hovering over a user interface item then a further determination is made as to whether a translation should be performed. Additional details regarding this process will be provided below with reference to
If it is detected that a user interface cursor is hovering over a user interface item at operation 302, the routine 300 proceeds to operation 304 where the MIST module 102 determines whether the user interface item 200 that is being hovered over has an associated screentip 204. If the user interface item 200 has a screentip 204, the routine 300 proceeds to operation 306 where the MIST module 102 determines whether the identified screentip 204 has a corresponding translated text string (a “translation”). If the screentip 204 does have a translation, the routine 300 proceeds from operation 306 to operation 308 where the MIST module 102 replaces the text shown in the screentip 204 with the translation and displays the screentip. Details regarding the functionality performed by the MIST module 102 for determining whether a specific text string has an associated translation will be provided below with reference to
If, at operation 304, the MIST module 102 determines that the user interface item 200 over which the user interface cursor is hovering does not have a screentip, the routine 300 proceeds from operation 304, to operation 310. At operation 310, the MIST module 102 determines whether the user interface item 200 has an associated supertip. As discussed above, a supertip might include multiple text strings and graphics.
If the user interface item 200 has a supertip, the routine 300 proceeds from operation 310 to operation 312, where the MIST module 102 determines whether the first text item in the supertip has a translation. If so, the routine 300 proceeds to operation 316, where the MIST module 102 replaces the item text in the supertip with a translated text string and displays the translation. The routine 300 then proceeds from operation 316 to operation 318 where a determination is made as to whether the last item text in the supertip has been translated. If additional text items remain to be translated in the supertip, the routine 300 proceeds to operation 312, where the processing described above with reference to operations 312 and 316 are repeated. If no additional text items remain in the supertip to be translated, the routine 300 proceeds from operation 318 to operation 324, where it ends.
If, at operation 310, the MIST module 102 determines that the user interface item 200 does not have a supertip, the routine 300 proceeds from operation 310 to operation 314. At operation 314, the MIST module 102 determines whether the user interface item 200 contains a text string. If not, the routine 300 proceeds to operation 324, where it ends. If the user interface item 200 does have a text string, the routine 300 proceeds from operation 314 to operation 320. At operation 320, the MIST module 102 determines whether a translated text string is available that corresponds to the text string contained in the user interface item. If so, the routine 300 proceeds from operation 320 to operation 322, where the MIST module 102 creates a screentip with a translation of the text contained in the user interface item and displays the created screentip. Such a screentip is shown in
Referring now to
In one implementation, the unique identifiers stored in the field 402C are generated by extracting resource strings from the applications 104A-104C and assigning a unique identifier to each string. Additionally, metadata is also collected at this time indicating whether each string is part of a menu, part of a dialog, associated with a hot key, the source dynamically linked library (“DLL”) from which the string was extracted, a resource identifier associated with the string, and other information. As will be discussed in greater detail below, this metadata is stored in the field 402B. The source language index file 106 and the target language string file 108 are generated with this information at build time.
As discussed briefly above, the field 402B is utilized to store metadata associated with a corresponding text string. For instance, according to one embodiment, metadata may be stored to assist in identifying a unique identifier that should be utilized to locate a translated text string when multiple unique identifiers are present for a given entry in the field 402C of the source language index file 106. As discussed above, the metadata might include, but is not limited to, data indicating whether each string is part of a menu, a dialog, or associated with a hot key, data identifying the source DLL from which a string was extracted, a resource identifier associated with the string, and other information.
As also shown in
As also shown in
It should be appreciated that the unique identifiers stored in the fields 402C and 406A are the same for all languages. In this way, the mechanisms presented herein can produce a linear number of translation mappings. For instance, it should be appreciated that using the methods presented herein, it is only necessary to map the strings in each language to the corresponding unique identifier. It is not necessary to map translations between languages (e.g. English to French, English to German, English to Dutch, French to German, etc.). This allows the use of relatively small source language index files 106 and target language string files 108, which reduces memory and disk usage. In one implementation, the unique identifier is a number from 1 to N, where N is any integer. This allows only the strings to be saved in the target language string file in one embodiment. The unique identifier can be implicitly determined based upon the order of the strings. It should be appreciated that other embodiments might utilize a non-linear number of translation mappings.
According to one implementation, the unique identifiers for the strings are grouped by location and stored together. For instance, using such an implementation, the strings for a given menu or other user interface element would stored together in the same chunk (e.g. 16 kb portion) of the source language index file 106 and target language string file 108. Because the source language index file 106 and the target language string file 108 are stored on disk, storing the strings for a particular user interface element together can significantly reduce the number of disk accesses required to retrieve the translated strings for a particular user interface element.
Turning now to
From operation 504, the routine 500 proceeds to operation 506 where the MIST module 102 utilizes the hash value 412 to locate the appropriate entry 404 in the source language index file 106 corresponding to the hash value 412. Once the appropriate entry 404 has been identified, the routine 500 proceeds to operation 508 where the unique identifier stored in the field 402C for the identified entry 404 is located. From operation 508, the routine 500 proceeds to operation 510.
At operation 510, the MIST module 102 determines whether multiple unique identifiers were located in the field 402C for the located entry 404. If so, the routine 500 proceeds to operation 512 where the MIST module 102 compares the metadata stored in the field 402B for the identified entry 404C to runtime metadata generated by the application to identify the particular unique identifier that should be utilized as an index into the target language string file 108. Once the unique identifier that should be utilized to index the target language string file has been identified, the routine 500 proceeds from operation 512 to operation 514.
If, at operation 510, the MIST module 102 determines that multiple unique identifiers have not been located, the routine 500 proceeds from operation 510 to operation 514. At operation 514, the MIST module 102 identifies the application 104A-104C that generated the source string 410. Once the application 104A-104C that generated the source string 410 has been identified, the routine 500 proceeds to operation 516. At operation 516, the MIST module 102 loads the target language string file 108 for the specified target language and the application 104A-104C that generated the source string 410.
From operation 516, the routine 500 proceeds to operation 518 where the unique identifier located for the source string 410 is utilized as an index into the target language string file 108. In this manner, the translated string contained in the field 406B for the identified entry 408 in the target language string file 108 can be identified. Once the translated string has been identified, the routine 518 proceeds to operation 520, where the MIST module 102 displays the translated string in the screentip 204 in the manner described above. From operation 520, the routine 500 proceeds to operation 522.
According to some embodiments, the applications 104A-104C may store text strings containing multiple words as separate strings. At runtime, the applications 104 may concatenate the separate strings to generate a concatenated text string for display. Through this mechanism, the applications 104A-104C may save memory by storing fewer duplicated strings. Because strings formed from the concatenation of other strings and are not stored as individual strings, it may be difficult for the MIST module 102 to provide on-the-fly translations of these strings.
As also shown in
Referring now to
Once the component strings 604A-604B have been translated, the routine 700 proceeds to operation 710 where the MIST module 102 concatenates the translated strings to form a translated compound string. Once the translated compound string has been generated, the MIST module 102 displays the translated compound string in a screentip 204 in the manner described above. From operation 712, the routine 700 proceeds to operation 714, where it ends.
As discussed briefly above, the MIST module 102 may utilize one or more timers that are utilized to initiate a determination of whether a translation is required for a particular text string. For instance, the expiration of a timer may cause the MIST module 102 to perform an inquiry as to whether the user interface cursor 202 has been moved, the current location of the user interface cursor 202, the text string that the user interface cursor 202 is hovering over, and to determine whether a new translation is needed.
The routine 800 begins at operation 802, where the MIST module 102 sets a timer that is utilized to determine whether a translation of a text string should be performed. From operation 802, the routine 800 proceeds to operation 804 where the MIST module 102 determines whether the timer has expired. If the timer has not expired, the routine 800 proceeds back to operation 804 where another such determination is made. If the timer has expired, the routine 800 proceeds to operation 806 where the MIST module 102 determines whether a new translation is required. If no translation is required, the routine 800 proceeds once again to operation 802 where the timer is reset and the above-described operations are performed again. If the MIST module 102 determines that a new translation is required, the routine 800 proceeds from operation 806 to operation 808, where the translation is performed in the manner presented above with respect to
According to embodiments presented herein, the MIST module 102 is configured to modify the duration of the timer when certain circumstances are detected. For instance, in one implementation, the MIST module 102 is configured to reduce the duration of the timer when modality is detected within the application 104A-104C. Modality refers to a state of an application 104A-104C wherein a user of the application can perform no other tasks until a particular action is taken. For instance, a modal dialog box may be presented by one of the applications 104A-104C that requires the user to perform a selection within the modal dialog box. Until the selection is made, the user can take no other action within the application. One process utilized by the MIST module 102 for modifying the timer duration is illustrated in
The routine 900 begins at operation 902 where the MIST module 102 determines whether modality has been detected in the application 104. If not, the routine 900 returns to operation 902 where another such determination is made. If modality is detected, the routine 900 proceeds to operation 904 where the MIST module 102 reduces the duration of the timer, therefore causing it to execute more frequently. In this manner, the timer is configured to run more often, thereby performing the translation determination described above in a more frequent fashion.
From operation 904, the routine 900 proceeds to operation 906 where the MIST module 102 determines whether the modality has ceased, such as when a user dismisses a modal dialog box. If not, the routine 900 returns to operation 906 where another such determination is made. If the modality has ceased, the routine 900 proceeds to operation 908 where the MIST module 102 increases the timer duration to its original duration. From operation 908, the routine 900 proceeds to operation 902 where the operations described above may be repeated.
The computer architecture shown in
The mass storage device 1010 is connected to the CPU 1002 through a mass storage controller (not shown) connected to the bus 1004. The mass storage device 1010 and its associated computer readable storage media provide non-volatile storage for the computer 1000. Although the description of computer readable storage media contained herein refers to a mass storage device, such as a hard disk or CD-ROM drive, it should be appreciated by those skilled in the art that computer storage media can be any available computer storage media that can be accessed by the computer 1000.
By way of example, and not limitation, computer readable storage media may include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable and executable instructions, data structures, program modules or other data. For example, computer storage media includes, but is not limited to, RAM, ROM, EPROM, EEPROM, flash memory or other solid state memory technology, CD-ROM, digital versatile disks (“DVD”), HD-DVD, BLU-RAY, or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by the computer 1000.
According to various embodiments, the computer 1000 may operate in a networked environment using logical connections to remote computers through a network such as the network 1020. The computer 1000 may connect to the network 1020 through a network interface unit 1006 connected to the bus 1004. It should be appreciated that the network interface unit 1006 may also be utilized to connect to other types of networks and remote computer systems. The computer 1000 may also include an input/output controller 1012 for receiving and processing input from a number of other devices, including a keyboard, mouse, or electronic stylus (not shown in
As mentioned briefly above, a number of program modules and data files may be stored in the mass storage device 1010 and RAM 1014 of the computer 1000, including an operating system 1018 suitable for controlling the operation of a networked desktop, laptop, or server computer. The mass storage device 1010 and RAM 1014 may also store one or more program modules. In particular, the mass storage device 1010 and the RAM 1014 may store the application 104 and the MIST module 102, each of which was described above in detail. The mass storage device 1010 and the RAM 1014 may also store other types of program modules and data.
It should be appreciated that the software components described herein may, when loaded into the CPU 1002 and executed, transform the CPU 1002 and the overall computer 1000 from a general-purpose computing system into a special-purpose computing system customized to facilitate the functionality presented herein. The CPU 1002 may be constructed from any number of transistors or other discrete circuit elements, which may individually or collectively assume any number of states. More specifically, the CPU 1002 may operate as a finite-state machine in response to executable instructions contained within the software modules disclosed herein. These computer-executable instructions may transform the CPU 1002 by specifying how the CPU 1002 transitions between states, thereby transforming the transistors or other discrete hardware elements constituting the CPU 1002.
Encoding the software modules and data presented herein might also transform the physical structure of the computer storage media presented herein. The specific transformation of physical structure may depend on various factors, in different implementations of this description. Examples of such factors may include, but are not limited to: the technology used to implement the computer storage media, whether the computer storage media is characterized as primary or secondary storage, and the like. For example, if the computer storage media is implemented as semiconductor-based memory, the software disclosed herein may be encoded on the computer readable storage media by transforming the physical state of the semiconductor memory. For example, the software may transform the state of transistors, capacitors, or other discrete circuit elements constituting the semiconductor memory. The software may also transform the physical state of such components in order to store data thereupon.
As another example, the computer storage media disclosed herein may be implemented using magnetic or optical technology. In such implementations, the software presented herein may transform the physical state of magnetic or optical media, when the software is encoded therein. These transformations may include altering the magnetic characteristics of particular locations within given magnetic media. These transformations may also include altering the physical features or characteristics of particular locations within given optical media, to change the optical characteristics of those locations. Other transformations of physical media are possible without departing from the scope and spirit of the present description, with the foregoing examples provided only to facilitate this discussion.
In light of the above, it should be appreciated that many types of physical transformations take place in the computer 1000 in order to store and execute the software components presented herein. It also should be appreciated that the computer 1000 may comprise other types of computing devices, including hand-held computers, embedded computer systems, personal digital assistants, and other types of computing devices known to those skilled in the art. It is also contemplated that the computer 1000 may not include all of the components shown in
Based on the foregoing, it should be appreciated that technologies for dynamic screentip language translation have been disclosed herein. Although the subject matter presented herein has been described in language specific to computer structural features, methodological and transformative acts, specific computing machinery, and computer storage media, it is to be understood that the invention defined in the appended claims is not necessarily limited to the specific features, acts, or media described herein. Rather, the specific features, acts and mediums are disclosed as example forms of implementing the claims.
The subject matter described above is provided by way of illustration only and should not be construed as limiting. Various modifications and changes may be made to the subject matter described herein without following the example embodiments and applications illustrated and described, and without departing from the true spirit and scope of the present invention, which is set forth in the following claims.
This application is a continuation of co-pending U.S. application Ser. No. 12/481,635 entitled “Dynamic Screentip Language Translation,” filed Jun. 10, 2009, which is incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
Parent | 12481635 | Jun 2009 | US |
Child | 13674487 | US |