[Table of Contents] [docx version]

WordprocessingML Reference Material - Table of Contents

lang (Languages for Run Content)

This element specifies the languages which shall be used to check spelling and grammar (if requested) when processing the contents of this run.

If this element is not present, the default value is to leave the formatting applied at previous level in the style hierarchy. If this element is never applied in the style hierarchy, then the languages for the contents of this run shall be automatically determined based on their contents using any method desired.

[Example: Consider a run which contains both Latin and complex script characters in its contents. If those contents should be interpreted as French (Canada) and Hebrew, respectively, that requirement would be specified as follows in the resulting WordprocessingML:

<w:r>

<w:rPr>

<w:lang w:val="fr-CA" w:bidi="he-IL" />

</w:rPr>

</w:r>

The resulting run specifies that any complex script contents shall be spell and grammar checked as if they were Hebrew, and any Latin character contents shall be spell and grammar checked as if they were French (Canada). end example]

Parent Elements

rPr2.7.8.1); rPr2.3.1.29); rPr2.5.2.26); rPr2.3.2.25); rPr2.3.2.26); rPr2.7.4.4); rPr2.3.1.30); rPr2.9.26); rPr2.5.2.27); rPr2.7.5.2)

 

Attributes

Description

bidi (Complex Script Language)

Specifies the language which shall be used when processing the contents of this run which use complex script characters, as determined by the Unicode character values of the run content.

 

If this attribute is omitted, then the languages for the contents of this run using complex script characters shall be automatically determined based on their contents using any appropriate method.

 

[Example: Consider a run which contains complex script characters in its contents. If those contents should be interpreted as Hebrew, that requirement would be specified as follows in the resulting WordprocessingML:

 

<w:r>

<w:rPr>

<w:lang w:bidi="he-IL" />

</w:rPr>

</w:r>

 

The resulting run specifies that any complex script contents shall be spell and grammar checked using a Hebrew dictionary and grammar engine, if one is available. end example]

 

The possible values for this attribute are defined by the ST_Lang simple type2.18.51).

eastAsia (East Asian Language)

Specifies the language which shall be used when processing the contents of this run which use East Asian characters, as determined by the Unicode character values of the run content.

 

If this attribute is omitted, then the languages for the contents of this run using East Asian characters shall be automatically determined based on their contents using any appropriate method.

 

[Example: Consider a run which contains East Asian characters in its contents. If those contents should be interpreted as Korean, that requirement would be specified as follows in the resulting WordprocessingML:

 

<w:r>

<w:rPr>

<w:lang w:bidi="ko-KR" />

</w:rPr>

</w:r>

 

The resulting run specifies that any complex script contents shall be spell and grammar checked using a Korean dictionary and grammar engine, if one is available. end example]

 

The possible values for this attribute are defined by the ST_Lang simple type2.18.51).

val (Latin Language)

Specifies the language which shall be used to check spelling and grammar (if requested) when processing the contents of this run which use Latin characters, as determined by the Unicode character values of the run content.

 

If this attribute is omitted, then the languages for the contents of this run using Latin characters shall be automatically determined based on their contents using any appropriate method.

 

[Example: Consider a run which contains Latin characters in its contents. If those contents should be interpreted as English (Canada), that requirement would be specified as follows in the resulting WordprocessingML:

 

<w:r>

<w:rPr>

<w:lang w:bidi="en-CA" />

</w:rPr>

</w:r>

 

The resulting run specifies that any complex script contents shall be spell and grammar checked using a English (Canada) dictionary and grammar engine, if one is available. end example]

 

The possible values for this attribute are defined by the ST_Lang simple type2.18.51).

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_Language">

   <attribute name="val" type="ST_Lang" use="optional"/>

   <attribute name="eastAsia" type="ST_Lang" use="optional"/>

   <attribute name="bidi" type="ST_Lang" use="optional"/>

</complexType>