创建 LocaleInfo.xml 提交文件Create the LocaleInfo.xml Submission File

LocaleInfo XML 架构LocaleInfo XML Schema

设备清单提交包必须包含一个 LocaleInfo.xml 文档,其中包含硬件开发人员中心仪表板用来验证设备元数据包中的区域设置信息的信息。A device manifest submission package must contain one LocaleInfo.xml document, which has information that the Hardware Dev Center Dashboard uses to validate the locale information in the device metadata package.

LocaleInfo.xml 文档中的数据基于 LocaleInfo XML 架构(将在下面进行介绍)设置格式。The data in the LocaleInfo.xml document is formatted based on the LocaleInfo XML schema, which is described below.

注意Note
该 XML 文档必须使用 UTF-8 编码进行保存。The XML document must be saved by using UTF-8 encoding.

有关地址范围的详细信息,请参阅如何为设备和打印机创建设备元数据包For more information about address ranges, see How to Create a Device Metadata Package for Devices and Printers.

LocaleInfo XML 架构命名空间LocaleInfo XML Schema NameSpace

以下是 LocaleInfo XML 架构的命名空间:http://schemas.microsoft.com/Windows/2010/08/MetadataSubmission/LocaleInfoThe following is the namespace of the LocaleInfo XML schema: http://schemas.microsoft.com/Windows/2010/08/MetadataSubmission/LocaleInfo

LocaleInfo XML 元素/属性概述Overview of LocaleInfo XML Elements/Attributes

下表描述 LocaleInfo XML 架构的元数据元素和属性。The following table describes the metadata elements and attributes of the LocaleInfo XML schema.

元素/属性Element/Attributes 元素/属性类型Element/Attribute type 必需/可选Required/ optional

MultipleLocaleMultipleLocale

xs:booleanxs:boolean

可选Optional

LocaleDeclaredInPackageInfoLocaleDeclaredInPackageInfo

tns:LocaleDeclaredInPackageInfoTypetns:LocaleDeclaredInPackageInfoType

可选Optional

defaultdefault

xs:booleanxs:boolean

必需Required

SupportedLocaleListSupportedLocaleList

tns:SupportedLocaleListTypetns:SupportedLocaleListType

可选Optional

LocaleLocale

xs:stringxs:string

可选Optional

LocaleInfo XML 架构定义LocaleInfo XML Schema Definition

以下是 LocaleInfo XML 架构定义:The following is the LocaleInfo XML schema definition:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://schemas.microsoft.com/Windows/2010/08/MetadataSubmission/LocaleInfo" xmlns:tns="http://schemas.microsoft.com/Windows/2010/08/MetadataSubmission/LocaleInfo" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" blockDefault="#all">

 <xs:element name="LocaleInfo" type="tns:LocaleInfoType" />

 <xs:complexType name="LocaleInfoType">
  <xs:sequence>
   <xs:element name="MultipleLocale" type="xs:boolean" />
   <xs:element name="LocaleDeclaredInPackageInfo" type="tns:LocaleDeclaredInPackageInfoType" />
   <xs:element name="SupportedLocaleList" type="tns:SupportedLocaleListType" minOccurs="0" />
   <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
  </xs:sequence>
 </xs:complexType>

  <xs:complexType name="LocaleDeclaredInPackageInfoType">
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute name="default" type="xs:boolean" use="required" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="SupportedLocaleListType">
    <xs:sequence>
      <xs:element name="Locale" type="xs:string" maxOccurs="unbounded" />
      <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>

</xs:schema>

LocaleInfo XML 架构参考LocaleInfo XML Schema Reference

LocaleInfo XML 架构定义以下元素和属性:The LocaleInfo XML schema defines the following elements and attributes:

  • LocaleInfoLocaleInfo

    • MultipleLocaleMultipleLocale

    • LocaleDeclaredInPackageInfoLocaleDeclaredInPackageInfo

      • defaultdefault
    • SupportedLocaleListSupportedLocaleList

      • LocaleLocale

MultipleLocale 元素MultipleLocale Element

MultipleLocale 元素指定设备元数据包是否支持多个区域设置。The MultipleLocale element specifies if the device metadata package supports multiple locales. 硬件开发人员中心仪表板使用此值可正确验证该包。The Hardware Dev Center Dashboard uses this value to properly validate the package.

<xs:element name="MultipleLocale" type="xs:boolean" />

备注Remarks

如果在设备元数据包中支持多个区域设置,则 MultipleLocale 元素必须为“true”。The MultipleLocale element must be “true” if more than one locale is supported in the device metadata package. 如果设备元数据包仅支持一个区域设置,则该元素可以为“true”或“false”。The element can be “true” or “false” if the device metadata package only supports one locale. MultipleLocale 的值必须匹配在 PackageInfo.xml 中指定的值。The value of MultipleLocale must match the value specified in PackageInfo.xml.

LocaleDeclaredInPackageInfo 元素LocaleDeclaredInPackageInfo Element

LocaleDeclaredInPackageInfo 元素指定有关在设备元数据包中声明的区域设置和程序包属性的信息。The LocaleDeclaredInPackageInfo element specifies information about the locale and package attributes declared in the device metadata package. 硬件开发人员中心仪表板使用此信息可正确验证设备元数据包中的已声明区域设置元数据。The Hardware Dev Center Dashboard uses this information to properly validate the declared locale metadata in the device metadata package.

<xs:element name="LocaleDeclaredInPackageInfo" type="tns:LocaleDeclaredInPackageInfoType" />

<xs:complexType name="LocaleDeclaredInPackageInfoType">
  <xs:simpleContent>
    <xs:extension base="xs:string">
      <xs:attribute name="default" type="xs:boolean" use="required" />
    </xs:extension>
  </xs:simpleContent>
</xs:complexType>

备注Remarks

LocaleDeclaredInPackageInfo 元素必须匹配在 PackageInfo.xml 中指定的区域设置值。The LocaleDeclaredInPackageInfo element must match the locale value specified in PackageInfo.xml.

default 属性default Attribute

default 属性指定设备元数据包是否为默认包,如 PackageInfo.xml 中所示。The default attribute specifies if the device metadata package is a default package, as indicated in PackageInfo.xml.

<xs:attribute name="default" type="xs:boolean" use="required" />

备注Remarks

default 元素必须匹配在 PackageInfo.xml 中指定的默认值。The default element must match the default value specified in PackageInfo.xml.

SupportedLocaleList 元素SupportedLocaleList Element

SupportedLocaleList 元素指定在设备元数据包中支持哪些其他区域设置。The SupportedLocaleList element specifies which other locales are supported in the device metadata package. 硬件开发人员中心仪表板使用此信息可正确验证设备元数据包中的其他区域设置元数据。The Hardware Dev Center Dashboard uses this information to properly validate the additional locale metadata in the device metadata package.

<xs:element name="SupportedLocaleList" type="tns:SupportedLocaleListType" minOccurs="0" />

<xs:complexType name="SupportedLocaleListType">
  <xs:sequence>
    <xs:element name="Locale" type="xs:string" maxOccurs="unbounded" />
    <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
  </xs:sequence>
</xs:complexType>

Locale 元素Locale Element

Locale 元素指定在设备元数据包中支持的额外区域设置。The Locale element specifies an extra locale that is supported in the device metadata package. 有关硬件开发人员中心仪表板如何使用此值的详细信息,请参阅“SupportedLocaleList 元素”。See SupportedLocaleList Element for more information about how the Hardware Dev Center Dashboard uses this value.

LocaleInfo XML 示例LocaleInfo XML Example

以下 XML 文档使用 LocaleInfo XML 架构来指定 LocaleInfo 信息的组成部分。The following XML document uses the LocaleInfo XML schema to specify the components of LocaleInfo information.

此示例适用于支持 en-US、ja-JP 和 fr-FR 区域设置的设备元数据包。This example applies to a device metadata package that supports the en-US, ja-JP, and fr-FR locales. 它列出了 PackageInfo.xml 中的 en-US 区域设置,并且是默认区域设置包,如 PackageInfo.xml 中所示。It lists the en-US locale in PackageInfo.xml and is a default locale package, as indicated in PackageInfo.xml.

<?xml version="1.0" encoding="utf-8"?>
<LocaleInfo xmlns="http://schemas.microsoft.com/Windows/2010/08/MetadataSubmission/LocaleInfo">

  <MultipleLocale>
    true
  </MultipleLocale>

  <LocaleDeclaredInPackageInfo default="true">
    en-US
  </LocaleDeclaredInPackageInfo>

  <SupportedLocaleList>
    <Locale>en-US</Locale>
    <Locale>ja-JP</Locale>
    <Locale>fr-FR</Locale>
  </SupportedLocaleList>

</LocaleInfo>

向 Microsoft 发送有关该主题的评论Send comments about this topic to Microsoft