CA2433512C - File translation - Google Patents
File translation Download PDFInfo
- Publication number
- CA2433512C CA2433512C CA002433512A CA2433512A CA2433512C CA 2433512 C CA2433512 C CA 2433512C CA 002433512 A CA002433512 A CA 002433512A CA 2433512 A CA2433512 A CA 2433512A CA 2433512 C CA2433512 C CA 2433512C
- Authority
- CA
- Canada
- Prior art keywords
- file
- components
- translatable
- translated
- translatable components
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000013519 translation Methods 0.000 title claims description 33
- 238000000034 method Methods 0.000 claims description 20
- 238000000605 extraction Methods 0.000 claims description 5
- 238000011065 in-situ storage Methods 0.000 claims description 4
- 238000012545 processing Methods 0.000 description 13
- 238000010586 diagram Methods 0.000 description 3
- 238000003860 storage Methods 0.000 description 3
- 238000013461 design Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/12—Use of codes for handling textual entities
- G06F40/151—Transformation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/12—Use of codes for handling textual entities
- G06F40/14—Tree-structured documents
- G06F40/143—Markup, e.g. Standard Generalized Markup Language [SGML] or Document Type Definition [DTD]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/40—Processing or translation of natural language
- G06F40/58—Use of machine translation, e.g. for multi-lingual retrieval, for server-side translation for client devices or for real-time translation
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y10—TECHNICAL SUBJECTS COVERED BY FORMER USPC
- Y10S—TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y10S707/00—Data processing: database and file management or data structures
- Y10S707/99941—Database schema or data structure
- Y10S707/99943—Generating database or data structure, e.g. via user interface
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y10—TECHNICAL SUBJECTS COVERED BY FORMER USPC
- Y10S—TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y10S707/00—Data processing: database and file management or data structures
- Y10S707/99941—Database schema or data structure
- Y10S707/99944—Object-oriented database structure
- Y10S707/99945—Object-oriented database structure processing
Abstract
A solution for translating translatable components in a file containing structured information from a source language to one or more selected destination languages is disclosed.
In an embodiment, the translatable components in the original file may be identified by an identifier. Such an identifier may be, for example, a prefix character string which may be located using a suitable parser. The file and its translatable components may then be separated into a structural base or "skeleton" file, and an "isolated" file containing the translatable components. The translatable components in the isolated file may then be translated from the source language to a selected destination language to form translated components. These translated components in the isolated file may then be merged with the skeletal file to create a new file having substantially the same structure as the original file, but with the translatable components translated into the selected destination language.
In an embodiment, the translatable components in the original file may be identified by an identifier. Such an identifier may be, for example, a prefix character string which may be located using a suitable parser. The file and its translatable components may then be separated into a structural base or "skeleton" file, and an "isolated" file containing the translatable components. The translatable components in the isolated file may then be translated from the source language to a selected destination language to form translated components. These translated components in the isolated file may then be merged with the skeletal file to create a new file having substantially the same structure as the original file, but with the translatable components translated into the selected destination language.
Description
FILE TRANSLATION
BACKGROUND OF THE INVENTION
The present invention relates generally to computer systems, and more specifically to translation of files containing structured information and translatable components.
One type of file containing structured information is known as an Extensible Markup Language ("XML") file. As known to those skilled in the art, XML is a meta-language for documents. XML provides a way of defining structured information containing content, such as text and graphics, and an indication of how such content may be used. Due to its inherent flexibility, XML may be used to describe structures for a wide range of data types. XML files have thus become a widely adopted format for exchanging various types of data, for example on the Internet.
An XML file may often include translatable components (i.e. elements or attributes) in the structured information, typically in one source language. With the global reach of the Internet, it is often desirable to have the translatable components in an XML
file translated from the source language to one of a number of selected destination languages. A
difficulty with translating XML files is that, due to their inherent flexibility, one XML file may have a structure which is quite different from that of another XML file.
Consequently, it may be difficult to identify translatable components in an XML document, and the results of a translation may not be satisfactory.
What is needed is a design for translating files containing structured information and translatable components, which at least partially addresses the difficulty described above.
SUMMARY OF THE INVENTION
The present invention provides a solution for translating translatable components in a file containing structured information from a source language to one or more selected destination languages.
In an embodiment, the translatable components in the original file may be identified by an identifier. Such an identifier rnay be, for example, a prefix character string which may be located using a suitable parser. The file and its translatable components may then be separated into a structural base or "skeleton" file, and an "isolated" file containing the translatable components. The translatable components in the isolated file may then be translated from the source language to a selected destination language to fomn translated components. These translated components in the isolated file may then be merged with the skeletal file to create a new file having substantially the same structure as the original file, but with the translatable components translated into the selected destination language.
In an embodiment, the file containing structured information is an XML file, and the translatable components are translatable element and attribute values in the XML file.
In another embodiment, an XML schema definition file may be created to describe the structure of the original XML file. A suitable parser may then parse the original XML file and use the XML schema definition file to identify all of the translatable "types"
of elements and attributes in the original XML file. Upon such identification, values or character strings assigned to the translatable elements and attributes may be translated from the source language to a selected destination language. In an embodiment, the values of the translatable elements and attributes may be overwritten in situ in the XML file by a corresponding value translated into a selected destination language.
Advantageously, a file containing structured information and translatable components, . _ ,. _ .m_~-_ .> ...~,-~w . .~... ~,... ._ t ..4,.. , . -- -~
..~,~~,~..=~~~"~- . w.~. . ..~ .~..,.Fm...a. . __.
such as an XML file, may be more readily translated from a source language to a selected destination language, with a reduced probability of errors caused by attempting to translate non-translatable parts of a file.
In an aspect of invention, there is provided a method of translating translatable components in a structured file, comprising:
(i) parsing said structured file to identify said translatable components and a source language;
(ii) effecting translation of said identified translatable components from said source language to a selected destination language so as to generate corresponding translated components;
(iii) generating a new translated file having substantially the same structure as said structured file and having said translated components in place of said translatable components.
I S In another aspect of the invention, there is provided a system for translating translatable components in a structured file, comprising:
(a) a parser for parsing said structured file to identify said translatable components and a source language;
(b) an interface to a translator for translation of said identified translatable components from said source language to a selected destination language to generate corresponding translated components;
(c) an output module for generating a new translated file having substantially the same structure as said structured file and having said translated components in place of said translatable components.
In another aspect of the invention, there is provided a computer readable medium for translating translatable components in a structured file, the computer readable medium comprising:
(i) code for parsing said structured file to identify said translatable components and a source language;
(ii) code for effecting translation of said identified translatable components from said source language to a selected destination language so as to generate corresponding translated components;
(iii) code for generating a new translated file having substantially the same structure as said structured file and having said translated components in place of said translatable components In another aspect of the invention, there is provided a system for translating components in a structured file, comprising:
(a) means for parsing said structured file to identify said translatable components and a source language;
(b) means for interfacing to a translator for translation of said identified translatable components from said source language to a selected destination language to generate corresponding translated components;
(c) means for generating a new translated file having substantially the same structure as said structured file and having said translated components in place of said translatable components.
The foregoing and other aspects of the invention will be apparent from the following more particular descriptions of exemplary embodiments of the invention.
BRIEF DESCRIPTION OF THE DRAWINGS
In the figures which illustrate exemplary embodiments of the invention:
FIG. 1 is a schematic block diagram of a generic data processing system which may provide an operating environment for exemplary embodiments of the invention.
FIG. 2A is a schematic diagram of an illustrative XML file containing identified translatable elements and attributes.
FIG 2B is a schematic flowchart of a method nn accordance with an exemplary embodiment.
FIG. 3A is a schematic diagram of an illustrative XML file containing translatable elements and attributes.
FIG. 3B is an illustrative XML schema definition file corresponding to the XML
file of FIG. 3A.
FIG. 3C is a schematic flowchart of a method in accordance with another exemplary embodiment.
DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS
Referring to FIG l, shown is an illustrative data processing system 100 that may provide an operating environment for exemplary embodiments of the invention. The data processing system 100 may include a central processing unit ("CPU") 102 operatively connected to a 1 S storage unit 104 and to a random access memory ("RAM") 106. A user 107 may interact with the data processing system 100 using a video display 108, and various inputs such as a keyboard 110 and mouse 112. The data processing system 100 of FIG. 1 is illustrative and not meant to be limiting in terms of the type of data processing system that may provide a suitable operating environment for exemplary embodiments of the invention.
In the illustrative data processing system 100, a file 113 may be stored on storage 104.
For example, the file 113 may be an XML file containing structured information and translatable components, such as translatable elements and attributes. When accessed, the XML
file 113 may be stored in RAM 106 and processed by CPU 102.
In the illustrative data processing system 100, a software program 114 stored on a computer readable medium 116 may be copied onto storage 104, loaded into RAM
106, and processed by CPU 102. For example, the software program 114 may embody a method in accordance with an exemplary embodiment, as described further below. In an embodiment, the software program 114 may create one or more files, as generically indicated at 115. For example, the file or files 115 may relate to the XML file 113 and may be created as a result of parsing or translating the XML file I 13, as discussed further below. The file or files 1 I S may also be temporarily loaded into RAM 106 and processed by CPU 102, as the case may be.
Refernng to FIG. 2A, shown is an example of a portion of an XML file 210 containing translatable components, such as translatable element and attribute values. As shown at line 210a and 2IOf, this portion of the XML file 210 is labeled as "UserGroups". At line 210b, the attribute "Description" is assigned the value "$$$ Employees". At line 210c, the attribute "Language ID" is assigned the value "&en US;" to indicate "U.S. English". This is the "source" language of the XML file 210 in the context of the present discussion. At line 210d, the element "UserCondition" is assigned the value "$$$~Users with the role of customer service representative". In FIG. 2A, these values are shown in boldface for the purpose of illustration.
In an embodiment, the translatable components of the XML file 210 may be labeled by an identifier. For example, as shown in FIG. 2A an identifier in the form of a character string "$$$ " may be used as a prefix to label the translatable values at lines 210b and 210d.
Now referring to FIG. 2B, shown is a translation method 200 in accordance with an exemplary embodiment. This method 200 may be embodied as a software program (such as the software program 114 of FIG. 1) for execution on a data processing system (such as the data processing system 100 ofFIG. 1).
As shown, translatable components in the XML file 210 may undergo extraction at block 220. In an embodiment, the extraction method 220 may read the original XML file 210 to identify the translatable components. In the present example, a parser may be used to locate and identify occurrences of the prefix "$$$ " in the XML file 210. In an embodiment, a "Simple API for XML" or "SAX" parser may be used. If the prefix "$$$ " is present, then the attached value inside the quotation marks is assumed to be translatable and placed in an isolated XML file at block 230. Otherwise, the component of the XML file is assumed to be non-translatable file structure, and may be placed in a "skeleton" XML file at block 240.
In an embodiment, the isolated XML file may be configured to always have a standard file structure. This standard file structure of the isolated XML file is known by or communicated to a translator, such that translation of the extracted translatable components in the isolated XML file is straightforward.
Furthermore, as an attribute description in an XML file may be extracted to the isolated XML file as simply text, the attribute description is significantly easier to translate.
In an embodiment, a serial number (not shown) maybe associated with each translatable value extracted at block 220 from the original XML file. When a translatable value is extracted, the associated serial number may be used as a "placeholder" in the skeleton XML file such that the translated value may be subsequently returned to its proper location. For this purpose, the serial number may also be stored with each translatable component in the isolated XML file at block 230.
The isolated XML file may then undergo translation at block 242 to a selected destination language. For the purpose of this translation, the assigned value of "&en US;" of the "Language ID" attribute at line 210c may be passed on to block 242 along with the isolated XML file.
The translation at block 242 may then translate the translatable components in the isolated XML file and create one of a number of translated, isolated XML files 250a - 250n in one of a number of selected destination languages. The translation at block 242 rnay be performed by any one of a number of translators. For example, the translation may be performed by a software program which attempts to simulate human translation, or more simply CA9-2003-0052 '7 .. ~ ,. . ....~ _ . .." .,x . .~. . a .. . _ . ~.~~_~", . ...__,~ w~.._.~
__.._.~.__ _..___.___.._ attempts pseudo-translation using equivalent words in a dictionary.
Alternatively, the translatable components in the isolated XML file may be translated by a human translator (e.g.
the user 107 of FIG.1 ). It will also be appreciated that the isolated XML
file may be temporarily removed from the data processing system 100, translated elsewhere, and then returned to the data processing system 100. In each case, a translated, isolated XML file 250a-250n is created. Any one of these translated isolated XML files 250a 250n may then be merged with the skeleton XML file at block 260.
The merging at block 260 may create one of a number of new XML files 270a-270n which represent translated destination language equivalents to the original XML file 210. That is to say, the skeletal structure of the new XML files 270a-270n will be substantially identical to that of the original XML file 210, but the translatable components will have been translated into the selected destination language. During this merging procedure, each translated component may be returned to its proper location in the new XML files 270a-270n, for example by matching its serial number with that of a placeholder in the skeleton XML file 240.
The translatable components in the merged files 270a-270n need not contain the prefix "$$$ ". This is because the original file 210 will typically be available as a source for translation, and attempting to translate a translated version may result in more translation errors than if the original file 210 is always used as the translation source.
In an embodiment, a new language identifier corresponding to the translated language may replace the original language identifier on line 210c of the original XML
file 210. For example, if translated to Spanish, the string "&es_ES;" may replace the original string "&en_US;".
The exemplary method 200 shown in FIG. 2B first identifies and extracts the translatable components contained in the XML file 210, before translation of the translatable components takes place. This placement of the translatable components into an isolated file CA9-2003-0052 g . ,. r ," ;. ax ..s., ~.bf"~ , a.r, .. ...~.a~.ri .",".~. .~..~~.x t ~a.,=>.
~..x~,~~ .m ,,,.w..,. ..~... . .__...__ _.
allows translation to proceed with a substantially reduced. likelihood of errors arising from attempted translation of non-translatable parts of the original XML file 210.
Now referring to FIG. 3A, shown is another example of a portion of an XML file 310.
As shown at lines 3 l0a and 314f, this portion of the XML file 310 is labeled as "UserGroups".
Within this portion of the XML file 310, certain elements and attributes are defined. For example, at line 310b, the attribute "Name" is assigned the value of "Employees". At line 3 l Oc, the attribute "Language ID" is assigned the value of "&en US;" to indicate "US English".
At line 310d, the element "UserCondition" is assigned the value "Users with role of customer service representative". In FIG. 3A, these assigned values are shown in boldface for the purpose of illustration.
Referring to FIG. 3B, shown is an illustrative example of an XML schema definition file 320 associated with the portion of the XML file 310 of FIG. 3A. In this exai~nple, the XML
schema definition file 320 includes lines 320a-320j providing a complete structural description of the portion of the XML file 310. The XML schema definition file 320 further provides information identifying the translatable elements and attributes in the XML file 310.
For example, at line 320c, the element "UserCondition" is identified as being a "translatable"
type. Also, at line 320g the attribute "Description" is identified as being a "translatable" type.
At line 320i, the attribute "LanguageID" is identified as being a "language identifier" type.
Now referring to FIG. 3C, in an embodiment, the original XML file 310 of FIG.
3A and the XML schema definition file 320 of FIG. 3B may both be used as inputs at block 330 to parse the translatable elements and attributes in XML file 310. More specifically, the XML
schema definition file 320 of FIG. 3B may be used by a parser to identify in the XML file 310 the elements and attributes which are "translatable". In an embodiment, a "Document Object Model" or "DOM" parser may be used to parse both the XML file 310 and the XML
schema definition file 320. As will be appreciated by those skilled in the art, a tree structure formed by the DOM parser from the schema definition file 320 may be used to identify the "translatable"
types of elements and attributes. Upon identification, each "translatable"
type of element or attribute may be translated in situ from the source language "&en US;" to a selected destination language.
As shown in FIG. 3C, after undergoing the parsing procedure at block 330, the translatable elements may be translated at block 332. As at block 242 of FIG.
2B, the translation may be effected by any one of a number of translators, including translation by a software program, and translation by a human translator.
The translated XML file may then be saved as one of a number of new XML files 340a-344n incorporating the translated elements and attributes. The source language identifier "&en US;" provided in the XML file 310 may also be overwritten by the new destination language identifier corresponding to the selected destination language. For example, the selected destination language may be Spanish, with the identifier "&es_ES;".
While exemplary embodiments have been described above, it will be apparent to those skilled in the art that various changes and modifications may be made.
For example, while a prefix character string has been described as a possible identifier far translatable components, it will be appreciated that any other type of suitable identifier recognized by a software program may also be used.
Therefore, the scope of the invention is limited only by the language of the following claims.
..."_~. _ wc~a., _-anao>. . _- ~_ _av .v~ ~.. S,..rvvd-y.. _ '~;,vaa-~ -WnSy,%~l~~v,'X~kb~ ~ VH~SYO °. W4,4v~ ai ~ ro a=-......v.,_ ".,_...-..
_ _..
BACKGROUND OF THE INVENTION
The present invention relates generally to computer systems, and more specifically to translation of files containing structured information and translatable components.
One type of file containing structured information is known as an Extensible Markup Language ("XML") file. As known to those skilled in the art, XML is a meta-language for documents. XML provides a way of defining structured information containing content, such as text and graphics, and an indication of how such content may be used. Due to its inherent flexibility, XML may be used to describe structures for a wide range of data types. XML files have thus become a widely adopted format for exchanging various types of data, for example on the Internet.
An XML file may often include translatable components (i.e. elements or attributes) in the structured information, typically in one source language. With the global reach of the Internet, it is often desirable to have the translatable components in an XML
file translated from the source language to one of a number of selected destination languages. A
difficulty with translating XML files is that, due to their inherent flexibility, one XML file may have a structure which is quite different from that of another XML file.
Consequently, it may be difficult to identify translatable components in an XML document, and the results of a translation may not be satisfactory.
What is needed is a design for translating files containing structured information and translatable components, which at least partially addresses the difficulty described above.
SUMMARY OF THE INVENTION
The present invention provides a solution for translating translatable components in a file containing structured information from a source language to one or more selected destination languages.
In an embodiment, the translatable components in the original file may be identified by an identifier. Such an identifier rnay be, for example, a prefix character string which may be located using a suitable parser. The file and its translatable components may then be separated into a structural base or "skeleton" file, and an "isolated" file containing the translatable components. The translatable components in the isolated file may then be translated from the source language to a selected destination language to fomn translated components. These translated components in the isolated file may then be merged with the skeletal file to create a new file having substantially the same structure as the original file, but with the translatable components translated into the selected destination language.
In an embodiment, the file containing structured information is an XML file, and the translatable components are translatable element and attribute values in the XML file.
In another embodiment, an XML schema definition file may be created to describe the structure of the original XML file. A suitable parser may then parse the original XML file and use the XML schema definition file to identify all of the translatable "types"
of elements and attributes in the original XML file. Upon such identification, values or character strings assigned to the translatable elements and attributes may be translated from the source language to a selected destination language. In an embodiment, the values of the translatable elements and attributes may be overwritten in situ in the XML file by a corresponding value translated into a selected destination language.
Advantageously, a file containing structured information and translatable components, . _ ,. _ .m_~-_ .> ...~,-~w . .~... ~,... ._ t ..4,.. , . -- -~
..~,~~,~..=~~~"~- . w.~. . ..~ .~..,.Fm...a. . __.
such as an XML file, may be more readily translated from a source language to a selected destination language, with a reduced probability of errors caused by attempting to translate non-translatable parts of a file.
In an aspect of invention, there is provided a method of translating translatable components in a structured file, comprising:
(i) parsing said structured file to identify said translatable components and a source language;
(ii) effecting translation of said identified translatable components from said source language to a selected destination language so as to generate corresponding translated components;
(iii) generating a new translated file having substantially the same structure as said structured file and having said translated components in place of said translatable components.
I S In another aspect of the invention, there is provided a system for translating translatable components in a structured file, comprising:
(a) a parser for parsing said structured file to identify said translatable components and a source language;
(b) an interface to a translator for translation of said identified translatable components from said source language to a selected destination language to generate corresponding translated components;
(c) an output module for generating a new translated file having substantially the same structure as said structured file and having said translated components in place of said translatable components.
In another aspect of the invention, there is provided a computer readable medium for translating translatable components in a structured file, the computer readable medium comprising:
(i) code for parsing said structured file to identify said translatable components and a source language;
(ii) code for effecting translation of said identified translatable components from said source language to a selected destination language so as to generate corresponding translated components;
(iii) code for generating a new translated file having substantially the same structure as said structured file and having said translated components in place of said translatable components In another aspect of the invention, there is provided a system for translating components in a structured file, comprising:
(a) means for parsing said structured file to identify said translatable components and a source language;
(b) means for interfacing to a translator for translation of said identified translatable components from said source language to a selected destination language to generate corresponding translated components;
(c) means for generating a new translated file having substantially the same structure as said structured file and having said translated components in place of said translatable components.
The foregoing and other aspects of the invention will be apparent from the following more particular descriptions of exemplary embodiments of the invention.
BRIEF DESCRIPTION OF THE DRAWINGS
In the figures which illustrate exemplary embodiments of the invention:
FIG. 1 is a schematic block diagram of a generic data processing system which may provide an operating environment for exemplary embodiments of the invention.
FIG. 2A is a schematic diagram of an illustrative XML file containing identified translatable elements and attributes.
FIG 2B is a schematic flowchart of a method nn accordance with an exemplary embodiment.
FIG. 3A is a schematic diagram of an illustrative XML file containing translatable elements and attributes.
FIG. 3B is an illustrative XML schema definition file corresponding to the XML
file of FIG. 3A.
FIG. 3C is a schematic flowchart of a method in accordance with another exemplary embodiment.
DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS
Referring to FIG l, shown is an illustrative data processing system 100 that may provide an operating environment for exemplary embodiments of the invention. The data processing system 100 may include a central processing unit ("CPU") 102 operatively connected to a 1 S storage unit 104 and to a random access memory ("RAM") 106. A user 107 may interact with the data processing system 100 using a video display 108, and various inputs such as a keyboard 110 and mouse 112. The data processing system 100 of FIG. 1 is illustrative and not meant to be limiting in terms of the type of data processing system that may provide a suitable operating environment for exemplary embodiments of the invention.
In the illustrative data processing system 100, a file 113 may be stored on storage 104.
For example, the file 113 may be an XML file containing structured information and translatable components, such as translatable elements and attributes. When accessed, the XML
file 113 may be stored in RAM 106 and processed by CPU 102.
In the illustrative data processing system 100, a software program 114 stored on a computer readable medium 116 may be copied onto storage 104, loaded into RAM
106, and processed by CPU 102. For example, the software program 114 may embody a method in accordance with an exemplary embodiment, as described further below. In an embodiment, the software program 114 may create one or more files, as generically indicated at 115. For example, the file or files 115 may relate to the XML file 113 and may be created as a result of parsing or translating the XML file I 13, as discussed further below. The file or files 1 I S may also be temporarily loaded into RAM 106 and processed by CPU 102, as the case may be.
Refernng to FIG. 2A, shown is an example of a portion of an XML file 210 containing translatable components, such as translatable element and attribute values. As shown at line 210a and 2IOf, this portion of the XML file 210 is labeled as "UserGroups". At line 210b, the attribute "Description" is assigned the value "$$$ Employees". At line 210c, the attribute "Language ID" is assigned the value "&en US;" to indicate "U.S. English". This is the "source" language of the XML file 210 in the context of the present discussion. At line 210d, the element "UserCondition" is assigned the value "$$$~Users with the role of customer service representative". In FIG. 2A, these values are shown in boldface for the purpose of illustration.
In an embodiment, the translatable components of the XML file 210 may be labeled by an identifier. For example, as shown in FIG. 2A an identifier in the form of a character string "$$$ " may be used as a prefix to label the translatable values at lines 210b and 210d.
Now referring to FIG. 2B, shown is a translation method 200 in accordance with an exemplary embodiment. This method 200 may be embodied as a software program (such as the software program 114 of FIG. 1) for execution on a data processing system (such as the data processing system 100 ofFIG. 1).
As shown, translatable components in the XML file 210 may undergo extraction at block 220. In an embodiment, the extraction method 220 may read the original XML file 210 to identify the translatable components. In the present example, a parser may be used to locate and identify occurrences of the prefix "$$$ " in the XML file 210. In an embodiment, a "Simple API for XML" or "SAX" parser may be used. If the prefix "$$$ " is present, then the attached value inside the quotation marks is assumed to be translatable and placed in an isolated XML file at block 230. Otherwise, the component of the XML file is assumed to be non-translatable file structure, and may be placed in a "skeleton" XML file at block 240.
In an embodiment, the isolated XML file may be configured to always have a standard file structure. This standard file structure of the isolated XML file is known by or communicated to a translator, such that translation of the extracted translatable components in the isolated XML file is straightforward.
Furthermore, as an attribute description in an XML file may be extracted to the isolated XML file as simply text, the attribute description is significantly easier to translate.
In an embodiment, a serial number (not shown) maybe associated with each translatable value extracted at block 220 from the original XML file. When a translatable value is extracted, the associated serial number may be used as a "placeholder" in the skeleton XML file such that the translated value may be subsequently returned to its proper location. For this purpose, the serial number may also be stored with each translatable component in the isolated XML file at block 230.
The isolated XML file may then undergo translation at block 242 to a selected destination language. For the purpose of this translation, the assigned value of "&en US;" of the "Language ID" attribute at line 210c may be passed on to block 242 along with the isolated XML file.
The translation at block 242 may then translate the translatable components in the isolated XML file and create one of a number of translated, isolated XML files 250a - 250n in one of a number of selected destination languages. The translation at block 242 rnay be performed by any one of a number of translators. For example, the translation may be performed by a software program which attempts to simulate human translation, or more simply CA9-2003-0052 '7 .. ~ ,. . ....~ _ . .." .,x . .~. . a .. . _ . ~.~~_~", . ...__,~ w~.._.~
__.._.~.__ _..___.___.._ attempts pseudo-translation using equivalent words in a dictionary.
Alternatively, the translatable components in the isolated XML file may be translated by a human translator (e.g.
the user 107 of FIG.1 ). It will also be appreciated that the isolated XML
file may be temporarily removed from the data processing system 100, translated elsewhere, and then returned to the data processing system 100. In each case, a translated, isolated XML file 250a-250n is created. Any one of these translated isolated XML files 250a 250n may then be merged with the skeleton XML file at block 260.
The merging at block 260 may create one of a number of new XML files 270a-270n which represent translated destination language equivalents to the original XML file 210. That is to say, the skeletal structure of the new XML files 270a-270n will be substantially identical to that of the original XML file 210, but the translatable components will have been translated into the selected destination language. During this merging procedure, each translated component may be returned to its proper location in the new XML files 270a-270n, for example by matching its serial number with that of a placeholder in the skeleton XML file 240.
The translatable components in the merged files 270a-270n need not contain the prefix "$$$ ". This is because the original file 210 will typically be available as a source for translation, and attempting to translate a translated version may result in more translation errors than if the original file 210 is always used as the translation source.
In an embodiment, a new language identifier corresponding to the translated language may replace the original language identifier on line 210c of the original XML
file 210. For example, if translated to Spanish, the string "&es_ES;" may replace the original string "&en_US;".
The exemplary method 200 shown in FIG. 2B first identifies and extracts the translatable components contained in the XML file 210, before translation of the translatable components takes place. This placement of the translatable components into an isolated file CA9-2003-0052 g . ,. r ," ;. ax ..s., ~.bf"~ , a.r, .. ...~.a~.ri .",".~. .~..~~.x t ~a.,=>.
~..x~,~~ .m ,,,.w..,. ..~... . .__...__ _.
allows translation to proceed with a substantially reduced. likelihood of errors arising from attempted translation of non-translatable parts of the original XML file 210.
Now referring to FIG. 3A, shown is another example of a portion of an XML file 310.
As shown at lines 3 l0a and 314f, this portion of the XML file 310 is labeled as "UserGroups".
Within this portion of the XML file 310, certain elements and attributes are defined. For example, at line 310b, the attribute "Name" is assigned the value of "Employees". At line 3 l Oc, the attribute "Language ID" is assigned the value of "&en US;" to indicate "US English".
At line 310d, the element "UserCondition" is assigned the value "Users with role of customer service representative". In FIG. 3A, these assigned values are shown in boldface for the purpose of illustration.
Referring to FIG. 3B, shown is an illustrative example of an XML schema definition file 320 associated with the portion of the XML file 310 of FIG. 3A. In this exai~nple, the XML
schema definition file 320 includes lines 320a-320j providing a complete structural description of the portion of the XML file 310. The XML schema definition file 320 further provides information identifying the translatable elements and attributes in the XML file 310.
For example, at line 320c, the element "UserCondition" is identified as being a "translatable"
type. Also, at line 320g the attribute "Description" is identified as being a "translatable" type.
At line 320i, the attribute "LanguageID" is identified as being a "language identifier" type.
Now referring to FIG. 3C, in an embodiment, the original XML file 310 of FIG.
3A and the XML schema definition file 320 of FIG. 3B may both be used as inputs at block 330 to parse the translatable elements and attributes in XML file 310. More specifically, the XML
schema definition file 320 of FIG. 3B may be used by a parser to identify in the XML file 310 the elements and attributes which are "translatable". In an embodiment, a "Document Object Model" or "DOM" parser may be used to parse both the XML file 310 and the XML
schema definition file 320. As will be appreciated by those skilled in the art, a tree structure formed by the DOM parser from the schema definition file 320 may be used to identify the "translatable"
types of elements and attributes. Upon identification, each "translatable"
type of element or attribute may be translated in situ from the source language "&en US;" to a selected destination language.
As shown in FIG. 3C, after undergoing the parsing procedure at block 330, the translatable elements may be translated at block 332. As at block 242 of FIG.
2B, the translation may be effected by any one of a number of translators, including translation by a software program, and translation by a human translator.
The translated XML file may then be saved as one of a number of new XML files 340a-344n incorporating the translated elements and attributes. The source language identifier "&en US;" provided in the XML file 310 may also be overwritten by the new destination language identifier corresponding to the selected destination language. For example, the selected destination language may be Spanish, with the identifier "&es_ES;".
While exemplary embodiments have been described above, it will be apparent to those skilled in the art that various changes and modifications may be made.
For example, while a prefix character string has been described as a possible identifier far translatable components, it will be appreciated that any other type of suitable identifier recognized by a software program may also be used.
Therefore, the scope of the invention is limited only by the language of the following claims.
..."_~. _ wc~a., _-anao>. . _- ~_ _av .v~ ~.. S,..rvvd-y.. _ '~;,vaa-~ -WnSy,%~l~~v,'X~kb~ ~ VH~SYO °. W4,4v~ ai ~ ro a=-......v.,_ ".,_...-..
_ _..
Claims (22)
1. A method of translating translatable components in a structured file, comprising the steps of:
(i) parsing said structured file to identify said translatable components and a source language, wherein said structured file includes an identifier prior to said parsing, and wherein said identifier identifies each of said translatable components;
(ii) effecting translation of said identified translatable components from said source language to a selected destination language so as to generate corresponding translated components; and (iii) generating a new translated file having substantially the same structure as said structured file and having said translated components in place of said translatable components.
(i) parsing said structured file to identify said translatable components and a source language, wherein said structured file includes an identifier prior to said parsing, and wherein said identifier identifies each of said translatable components;
(ii) effecting translation of said identified translatable components from said source language to a selected destination language so as to generate corresponding translated components; and (iii) generating a new translated file having substantially the same structure as said structured file and having said translated components in place of said translatable components.
2. The method of claim 1, wherein said identifier is a prefix, and wherein said prefix is a character string.
3. The method of claim 2, wherein (i) further comprises identification of said prefix using a parser.
4. The method of claim 1, further comprising extracting said identified translatable components into an isolated file for effecting translation in (ii) of said translatable components to said translated components.
5. The method of claim 4, wherein said structured file, after extraction of said identified translatable components, comprises a skeleton file.
6. The method of claim 5, wherein (iii) further comprises merging said skeleton file and said translated components in said isolated file.
7. The method of claim 6, wherein said structured file is an XML file, and said translatable components comprise translatable element and attribute values.
8. The method of claim 1, wherein (i) further comprises utilizing a structure definition file corresponding to said structured file to identify said translatable components, said structure definition file containing identification information for said translatable components in said structured file.
9. The method of claim 8, wherein (ii) further comprises translating said translatable components in situ and (iii) further comprises replacing said translatable components with said corresponding translated components.
10. The method of claim 9, wherein said structured file is an XML file and said structure definition file is an XML schema definition file identifying translatable elements and attributes in said XML file.
11. A system for translating translatable components in a structured file, comprising :
(a) a parser for parsing said structured file to identify said translatable components and a source language, wherein said structured file includes an identifier prior to said parsing, and wherein said identifier identifies each of said translatable components;
(b) an interface to a translator for translation of said identified translatable components from said source language to a selected destination language to generate corresponding translated components; and (c) an output module for generating a new translated file having substantially the same structure as said structured file and having said translated components in place of said translatable components.
(a) a parser for parsing said structured file to identify said translatable components and a source language, wherein said structured file includes an identifier prior to said parsing, and wherein said identifier identifies each of said translatable components;
(b) an interface to a translator for translation of said identified translatable components from said source language to a selected destination language to generate corresponding translated components; and (c) an output module for generating a new translated file having substantially the same structure as said structured file and having said translated components in place of said translatable components.
12. The system of claim 11, wherein said identifier is a prefix, and wherein said prefix is a character string.
13. The system of claim 12, wherein said structured file is an XML file, and said parser comprises a SAX parser for searching for said identifiers which identify each translatable component.
14. The system of claim 11, further comprising an extraction module for extracting said identified translatable components into an isolated file for interfacing with said translation unit.
15. The system of claim 14, wherein said structured file, after extraction of said identified translatable components, comprises a skeleton file.
16. The system of claim 15, wherein said output module merges said skeleton file and said translated components in said isolated file.
17. The system of claim 11, wherein said parser is configured to parse a structure definition file corresponding to said structured file, said structure definition file containing identification information for said translatable components in said structured file.
18. The system of claim 17, wherein said structured file is an XML file, said structure definition file is an XML schema definition file, and said parser comprises a DOM parser.
19. The system of claim 18, wherein said translation module is configured to use said XML schema definition file and said DOM parser to identify said translatable components in said XML file, and to translate said translatable components in situ.
20. A computer readable medium for translating translatable components in a structured file, the computer readable medium comprising:
(i) code for parsing said structured file to identify said translatable components and a source language, wherein said structured file includes an identifier prior to said parsing, and wherein said identifier identifies each of said translatable components;
(ii) code for effecting translation of said identified translatable components from said source language to a selected destination language so as to generate corresponding translated components; and (iii) code for generating a new translated file having substantially the same structure as said structured file and having said translated components in place of said translatable components.
(i) code for parsing said structured file to identify said translatable components and a source language, wherein said structured file includes an identifier prior to said parsing, and wherein said identifier identifies each of said translatable components;
(ii) code for effecting translation of said identified translatable components from said source language to a selected destination language so as to generate corresponding translated components; and (iii) code for generating a new translated file having substantially the same structure as said structured file and having said translated components in place of said translatable components.
21. A system for translating components in a structured file, comprising:
(a) means for parsing said structured file to identify said translatable components and a source language, wherein said structured file includes an identifier prior to said parsing, and wherein said identifier identifies each of said translatable components;
(b) means for interfacing to a translator for translation of said identified translatable components from said source language to a selected destination language to generate corresponding translated components; and (c) means for generating a new translated file having substantially the same structure as said structured file and having said translated components in place of said translatable components.
(a) means for parsing said structured file to identify said translatable components and a source language, wherein said structured file includes an identifier prior to said parsing, and wherein said identifier identifies each of said translatable components;
(b) means for interfacing to a translator for translation of said identified translatable components from said source language to a selected destination language to generate corresponding translated components; and (c) means for generating a new translated file having substantially the same structure as said structured file and having said translated components in place of said translatable components.
22. The method of claim 1, wherein a serial number is associated with each of said translatable components, and wherein said serial number is used as a placeholder to place each of said translated components in a proper location within said new translated file.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CA002433512A CA2433512C (en) | 2003-06-26 | 2003-06-26 | File translation |
US10/782,501 US7231600B2 (en) | 2003-06-26 | 2004-02-19 | File translation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CA002433512A CA2433512C (en) | 2003-06-26 | 2003-06-26 | File translation |
Publications (2)
Publication Number | Publication Date |
---|---|
CA2433512A1 CA2433512A1 (en) | 2004-12-26 |
CA2433512C true CA2433512C (en) | 2008-01-15 |
Family
ID=33520310
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CA002433512A Expired - Fee Related CA2433512C (en) | 2003-06-26 | 2003-06-26 | File translation |
Country Status (2)
Country | Link |
---|---|
US (1) | US7231600B2 (en) |
CA (1) | CA2433512C (en) |
Families Citing this family (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7543270B1 (en) * | 2004-01-23 | 2009-06-02 | The Math Works, Inc. | Tracing output descriptions generated from corresponding input descriptions |
US9378293B2 (en) * | 2004-06-03 | 2016-06-28 | Paypal, Inc. | Method and apparatus to author and manage pages of a website |
US20060173901A1 (en) * | 2005-01-31 | 2006-08-03 | Mediatek Incorporation | Methods for merging files and related systems |
US8392872B2 (en) * | 2005-11-19 | 2013-03-05 | International Business Machines Corporation | Pseudo translation within integrated development environment |
US20070233456A1 (en) * | 2006-03-31 | 2007-10-04 | Microsoft Corporation | Document localization |
US8078611B2 (en) * | 2007-01-03 | 2011-12-13 | Oracle International Corporation | Query modes for translation-enabled XML documents |
US8145993B2 (en) * | 2007-01-03 | 2012-03-27 | Oracle International Corporation | XML-based translation |
US20080243475A1 (en) * | 2007-03-16 | 2008-10-02 | Steven Scott Everhart | Web content translation system, method, and software |
US8930356B2 (en) * | 2007-09-20 | 2015-01-06 | Yahoo! Inc. | Techniques for modifying a query based on query associations |
FR2924244B1 (en) * | 2007-11-22 | 2010-04-23 | Canon Kk | METHOD AND DEVICE FOR ENCODING AND DECODING INFORMATION |
US8584102B2 (en) * | 2007-12-27 | 2013-11-12 | Microsoft Corporation | Creating and using deltas to modify existing computer code |
CN101615181B (en) * | 2008-06-27 | 2012-05-16 | 国际商业机器公司 | System and method for establishing internationalized network application |
US8782514B1 (en) * | 2008-12-12 | 2014-07-15 | The Research Foundation For The State University Of New York | Parallel XML parsing using meta-DFAs |
US9864809B2 (en) | 2010-07-13 | 2018-01-09 | Motionpoint Corporation | Dynamic language translation of web site content |
US8515977B2 (en) | 2010-09-10 | 2013-08-20 | International Business Machines Corporation | Delta language translation |
US8670973B2 (en) | 2010-09-16 | 2014-03-11 | International Business Machines Corporation | Language translation reuse in different systems |
US8812295B1 (en) | 2011-07-26 | 2014-08-19 | Google Inc. | Techniques for performing language detection and translation for multi-language content feeds |
US10262377B2 (en) * | 2013-09-13 | 2019-04-16 | Mace Engineering Group Pty Ltd. | Sales order data collection and management system |
CN112074840A (en) * | 2018-05-04 | 2020-12-11 | 瑞典爱立信有限公司 | Method and apparatus for enriching entities with alternative text in multiple languages |
CN113378585B (en) * | 2021-06-01 | 2023-09-22 | 珠海金山办公软件有限公司 | XML text data translation method and device, electronic equipment and storage medium |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6091897A (en) | 1996-01-29 | 2000-07-18 | Digital Equipment Corporation | Fast translation and execution of a computer program on a non-native architecture by use of background translator |
US5903859A (en) | 1996-03-27 | 1999-05-11 | Dell Usa, L.P. | Dynamic multi-lingual software module system |
US6157210A (en) | 1997-10-16 | 2000-12-05 | Altera Corporation | Programmable logic device with circuitry for observing programmable logic circuit signals and for preloading programmable logic circuits |
US6286131B1 (en) | 1997-12-03 | 2001-09-04 | Microsoft Corporation | Debugging tool for linguistic applications |
US6425123B1 (en) | 1999-06-29 | 2002-07-23 | International Business Machines Corporation | System, method, and program for testing translatability of software by using english multi-byte transliteration creating double-wide characters |
US7027973B2 (en) * | 2001-07-13 | 2006-04-11 | Hewlett-Packard Development Company, L.P. | System and method for converting a standard generalized markup language in multiple languages |
US7627817B2 (en) * | 2003-02-21 | 2009-12-01 | Motionpoint Corporation | Analyzing web site for translation |
-
2003
- 2003-06-26 CA CA002433512A patent/CA2433512C/en not_active Expired - Fee Related
-
2004
- 2004-02-19 US US10/782,501 patent/US7231600B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
US20040267803A1 (en) | 2004-12-30 |
CA2433512A1 (en) | 2004-12-26 |
US7231600B2 (en) | 2007-06-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CA2433512C (en) | File translation | |
US6718519B1 (en) | System and method for outputting character sets in best available fonts | |
US6321372B1 (en) | Executable for requesting a linguistic service | |
US7478092B2 (en) | Key term extraction | |
US6813747B1 (en) | System and method for output of multipart documents | |
US6983238B2 (en) | Methods and apparatus for globalizing software | |
JP3220560B2 (en) | Machine translation equipment | |
CA2343496C (en) | Transmission of locale information | |
US8037199B2 (en) | Localization of resources used by applications in hand-held electronic devices and methods thereof | |
US6772110B2 (en) | Method and system for converting and plugging user interface terms | |
US20040025118A1 (en) | Glyphlets | |
US20070233456A1 (en) | Document localization | |
JPH10326255A (en) | Method for handling message independent of language | |
EP2107471A1 (en) | SGML document validation using xml-based technologies | |
US20060242166A1 (en) | Methods and systems for filtering an extensible application markup language (XAML) file to facilitate indexing of the logical content contained therein | |
CN102722479A (en) | A method and device for realizing language translation | |
CN112949324A (en) | Method, system and terminal for translating and managing aircraft maintenance technical manual data | |
CN107291907A (en) | A kind of multilingual storage of business datum and querying method and device | |
CN111831384A (en) | Language switching method and device, equipment and storage medium | |
US6760887B1 (en) | System and method for highlighting of multifont documents | |
US20080052616A1 (en) | Document Processing Method and Device | |
US7503036B2 (en) | Testing multi-byte data handling using multi-byte equivalents to single-byte characters in a test string | |
US20040098246A1 (en) | System and method for displaying documents in a language specified by a user | |
US7155443B2 (en) | System and method for application text localization | |
US20050154579A1 (en) | Apparatus for and method of analyzing chinese |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
EEER | Examination request | ||
MKLA | Lapsed | ||
MKLA | Lapsed |
Effective date: 20110627 |