Content management systems for providing automated translation of content items
Systems, methods and products for automatic translation of content items, where in one embodiment a system includes one or more processors configured to identify components of a content item to be translated (translation items) and components not to be translated (non-translation items). The system generates a key-value pair corresponding to each translation item, where the key-value pair includes a key which comprises a unique identifier and a value which comprises a text string of the translation item. The system also generates a translation template that corresponds to the content item, wherein the translation template matches the content item except that the text string of each translation item is replaced by the key of the corresponding key-value pair. The system then provides a translation of each of the key-value pairs. The system generates a translated content item. By replacing each key in the translation template with the corresponding generated translation.
1 . A system for automatic translation of content, the system comprising:
one or more processors configured to:
obtain a structured content item defined by a set of tags, wherein the set of tags includes one or more user-defined tags that are not standardized HTML tags;
access a content item template corresponding to the structured content item, wherein the content item template defines components of the structured content item, the content item template specifying each defined component as a translation item or a non-translation item;
identify, based on the content item template, translation items comprising components to be translated within the structured content item;
identify, based on the content item template, non-translation items comprising components not to be translated within the structured content item;
mark, within the structured content item, the identified non-translation items to indicate the identified non-translation items are not to be translated;
generate a key-value pair corresponding to each of the identified translation items, wherein each key-value pair includes a key which comprises a unique identifier and a value which comprises a text string of the translation item;
apply a skip-translation tag defined by a translation engine to the key of each generated key-value pair to identify the key as a non-translation item to the translation engine;
generate a translation template that corresponds to the structured content item, wherein the translation template matches the structured content item except that the text string of each identified translation item is replaced by the key of the corresponding key-value pair, wherein the marked, identified non-translation items remain in the translation template;
for each of the key-value pairs, provide the value and the key with the applied skip-translation tag to the translation engine and receive the key and a corresponding translation of the value; and
generate a translated structured content item by replacing each key in the translation template with the corresponding translation, thereby generating a translated structured content item that preserves the set of tags and the non-translation items from the obtained structured content item.
2 . The system of claim 1 , wherein the one or more processors comprise:
a translation item markup processor which is configured to identify components contained within the structured content item and mark non-translation items to be skipped;
an XML tag markup processor configured to identify the tags of translation items and mark tags of the translation items to be skipped;
a text extraction and identification processor configured to for each translation item, identify text of the translation item and associate the corresponding unique identifier with the identified text and generate the translation template in which the text of each translation item is replaced with the corresponding unique identifier;
a translation processor configured to provide the text of each translation item to the translation engine and receive the corresponding translation which is associated with the unique identifier of the text of the translation item; and
a template fill processor configured to, for each unique identifier in the template, replace the unique identifier in the translation template with the translation corresponding to the unique identifier and thereby produce the translated structured content item.
3 . The system of claim 2 , wherein the translation processor is configured to provide the text of each translation item to the translation engine of a publicly available translation service via an API of the publicly available translation service.
4 . The system of claim 1 , wherein each translation item is contained in a single text string comprising a concatenation of a plurality of key-value pairs, each key-value pair including the text of a corresponding one of the translation items and the corresponding unique identifier.
5 . The system of claim 1 , wherein the one or more processors are configured to maintain a status of translation of the structured content item in a translation processing data object, wherein the translation template is stored in the translation processing data object.
6 . The system of claim 1 , wherein the one or more processors are configured to identify translation items and non-translation items by, for each of the structured content items, identifying a corresponding content item template and identifying translation items and non-translation items according to tagging which is defined by the content item template.
7 . A method for automatic translation of content, the method comprising:
obtaining a structured content item defined by a set of tags, wherein the set of tags includes one or more user-defined tags that are not standardized HTML tags;
identifying a content item template corresponding to the structured content item, wherein the content item template defines components of the structured content item, the content item template specifying each defined component as a translation item or a non-translation item;
identifying, based on the content item template, translation items comprising components to be translated within the structured content item;
identifying, based on the content item template, non-translation items comprising components not to be translated within the structured content item;
marking, within the structured content item, the identified non-translation items to indicate the identified non-translation items are not to be translated;
generating a key-value pair corresponding to each of the identified translation items, wherein each key-value pair includes a key which comprises a unique identifier and a value which comprises a text string of the translation item;
applying a skip-translation tag defined by a translation engine to the key of each generated key-value pair to identify the key as a non-translation item to the translation engine;
generating a translation template that corresponds to the structured content item, wherein the translation template matches the structured content item except that the text string of each identified translation item is replaced by the key of the corresponding key-value pair, wherein the marked, identified non-translation items remain in the translation template;
for each of the key-value pairs, providing the value and the key with the applied skip-translation tag to the translation engine and receive the key and a corresponding translation of the value; and
generating a translated structured content item by replacing each key in the translation template with the corresponding translation, thereby generating a translated structured content item that preserves the set of tags and the non-translation items from the obtained structured content item.
8 . The method of claim 7 , wherein providing the translation corresponding to each of the key-value pairs comprises, for each key-value pair, tagging the key to skip translation of the key.
9 . The method of claim 7 , wherein providing the value to a translation engine comprises providing the text of each translation item to the translation engine of a publicly available translation service via an API of the publicly available translation service.
10 . The method of claim 9 , wherein each translation item is contained in a single text string comprising a concatenation of a plurality of key-value pairs, each key-value pair including the text of a corresponding one of the translation items and the corresponding unique identifier.
11 . The method of claim 7 , wherein for one or more of the translation items, the translation item comprises a user-defined tag and a text string, wherein the user-defined tag is unknown to the translation processor.
12 . The method of claim 7 , wherein identifying the translation items and the non-translation items comprises identifying a content item template corresponding to the structured content item, wherein the content item template includes a set of tag definitions for tagged items in the structured content item, and for each of the tagged items determining whether the tagged item is a translation item or a non-translation item based on the identified set of tag definitions.
13 . The method of claim 7 , further comprising maintaining a status of translation of the structured content item in a translation processing data object.
14 . A computer program product comprising a non-transitory computer-readable medium storing instructions executable by one or more processors to perform:
obtaining a structured content item defined by a set of tags, wherein the set of tags includes one or more user-defined tags that are not standardized HTML tags;
identifying a content item template corresponding to the structured content item, wherein the content item template defines components of the structured content item, the content item template specifying each defined component as a translation item or a non-translation item;
identifying, based on the content item template, translation items comprising components to be translated within the structured content item;
identifying, based on the content item template, non-translation items comprising components not to be translated within the structured content item;
marking, within the structured content item, the identified non-translation items to indicate the identified non-translation items are not to be translated;
generating a key-value pair corresponding to each of the identified translation items, wherein each key-value pair includes a key which comprises a unique identifier and a value which comprises a text string of the translation item;
applying a skip-translation tag defined by a translation engine to the key of each generated key-value pair to identify the key as a non-translation item to the translation engine;
generating a translation template that corresponds to the structured content item, wherein the translation template matches the structured content item except that the text string of each identified translation item is replaced by the key of the corresponding key-value pair, wherein the marked, identified non-translation items remain in the translation template;
for each of the key-value pairs, providing the value and the key with the applied skip-translation tag to the translation engine and receive the key and a corresponding translation of the value; and
generating a translated structured content item by replacing each key in the translation template with the corresponding translation, thereby generating a translated structured content item that preserves the set of tags and the non-translation items from the obtained structured content item.
15 . The computer program product of claim 14 , wherein providing the value of each key-value pair to a translation engine comprises providing the text of each translation item to the translation engine of a publicly available translation service via an API of the publicly available translation service.
16 . The computer program product of claim 15 , wherein each translation item is contained in a single text string comprising a concatenation of a plurality of the key-value pairs, each key-value pair including the text of a corresponding one of the translation items and the corresponding unique identifier.
17 . The computer program product of claim 14 , wherein for one or more of the translation items, the translation item comprises a user-defined tag and a text string, wherein the user-defined tag is unknown to the publicly available translation processor.
18 . The computer program product of claim 14 , wherein the instructions are further executable by the one or more processors to identify the translation items and the non-translation items by identifying a content item template corresponding to the structured content item, wherein the content item template includes a set of tag definitions for tagged items in the language structured content item, and for each of the tagged items determining whether the tagged item is a translation item or a non-translation item based on the identified set of tag definitions.
19 . The computer program product of claim 14 , wherein the instructions are further executable by the one or more processors to maintain a status of translation of the structured content item in a translation processing data object, wherein the translation template is stored in the translation processing data object.
20 . The computer program product of claim 14 , wherein the instructions are further executable by the one or more processors to identify translation items and non-translation items by, for each of the structured content items, identifying a corresponding content item template and identifying translation items and non-translation items according to tagging defined by the content item template.