次の方法で共有


Languages Class

Defines the Languages Class.When the object is serialized out as xml, its qualified name is w:lang.

Inheritance Hierarchy

System.Object
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlLeafElement
DocumentFormat.OpenXml.Wordprocessing.LanguageType
DocumentFormat.OpenXml.Wordprocessing.Languages

Namespace: DocumentFormat.OpenXml.Wordprocessing
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'宣言
Public Class Languages _
    Inherits LanguageType
'使用
Dim instance As Languages
public class Languages : LanguageType

Remarks

[ISO/IEC 29500-1 初版]

17.3.2.20 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 must be spell and grammar checked as if they were Hebrew, and any Latin character contents must be spell and grammar checked as if they were French (Canada). end example]

Parent Elements

rPr (§17.3.1.29); rPr (§17.3.1.30); rPr (§17.5.2.28); rPr (§17.9.25); rPr (§17.7.9.1); rPr (§17.7.5.4); rPr (§17.3.2.28); rPr (§17.5.2.27); rPr (§17.7.6.2); rPr (§17.3.2.27)

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 must 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 type (§22.9.2.6).

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:eastAsia="ko-KR" />
  </w:rPr>
</w:r>

The resulting run specifies that any complex script contents must 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 type (§22.9.2.6).

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:val="en-CA" />
  </w:rPr>
</w:r>

The resulting run specifies that any complex script contents must 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 type (§22.9.2.6).

[Note: The W3C XML Schema definition of this element's content model (CT_Language) is located in §A.1. end note]

© ISO/IEC29500: 2008. 上記の引用はマイクロソフト (またはその代理) によって英語から日本語に翻訳されたものであり、ISO はこうした翻訳に対する責任を一切負いません。

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Languages Members

DocumentFormat.OpenXml.Wordprocessing Namespace