支持文件类型 (Strings)

.RESX - Windows 8 Resource (Strings)

文本由 Phrase Language AI 从英语机器翻译而得。

文件扩展名

.resx, .resw

API 扩展

windows8_resource

导入

导出

复数形式支持

描述支持

一种主要由Windows应用程序使用的基于XML的文件格式。与其他文件格式(如.XLIFF和.TS)相比,它并不是专门为本地化或翻译而设计的,通常也不是双语或多语言的。在用于本地化时,待翻译的字符串存储在<value>元素中,该元素嵌套在<data>下。其他标签下的<value>元素不应更改或过滤以进行翻译。

代码示例

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <xsd:schema xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="root">
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
    <xsd:element name="root" msdata:IsDataSet="true">
      <xsd:complexType>
        <xsd:choice maxOccurs="unbounded"/>
        <xsd:element name="data">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="2"/>
            </xsd:sequence>
            <xsd:attribute name="name" type="xsd:string"/>
            <xsd:attribute name="type" type="xsd:string"/>
            <xsd:attribute name="mimetype" type="xsd:string"/>
          </xsd:complexType>
        </xsd:element>
        <xsd:element name="resheader">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
            </xsd:sequence>
            <xsd:attribute name="name" type="xsd:string" use="required"/>
          </xsd:complexType>
        </xsd:element>
      </xsd:complexType>
    </xsd:element>
  </xsd:schema>
  <resheader name="resmimetype">
    <value>text/microsoft-resx</value>
  </resheader>
  <resheader name="version">
    <value>2.0</value>
  </resheader>
  <resheader name="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <data name="boolean_key">
    <value>--- true
</value>
  </data>
  <data name="empty_string_translation">
    <value/>
  </data>
  <data name="key_with_description">
    <value>这个键有一个描述!(至少在某些格式中)</value>
    <comment>我是该键的重要描述!</comment>
  </data>
  <data name="key_with_line-break">
    <value>这个翻译包含
a line-break.</value>
  </data>
  <data name="nested.deeply.key">
    <value>我是一個深度嵌套的鍵。</value>
  </data>
  <data name="nested.key">
    <value>这个键嵌套在一个命名空间中。</value>
  </data>
  <data name="null_translation">
    <value/>
  </data>
  <data name="pluralized_key">
    <value>您没有复数形式。</value>
  </data>
  <data name="sample_collection">
    <value>---
- first item
- second item
- third item
</value>
  </data>
  <data name="simple_key">
    <value>简单的键,简单的消息。</value>
  </data>
  <data name="unverified_key">
    <value>尚未验证的翻译,正在等待。</value>(在某些格式中,我们也导出此状态)
  </data>
</root>
这篇文章有帮助吗?

Sorry about that! In what way was it not helpful?

The article didn’t address my problem.
I couldn’t understand the article.
The feature doesn’t do what I need.
Other reason.

Note that feedback is provided anonymously so we aren't able to reply to questions.
If you'd like to ask a question, submit a request to our Support team.
Thank you for your feedback.