支持文件类型 (Strings)

.RESX - Microsoft .NET (Strings)

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

文件扩展名

.resx、.resw

API 扩展

resx

导入

导出

复数形式支持

描述支持

.NET 是一个开源原文/源语软件开发框架,主要适用于 Microsoft Windows。使用 .NET 框架开发的应用程序的本地化工作主要涉及资源文件 (.resx)。

.resx 文件基于 XML,根元素为 <root>。Localizable Strings 通常嵌入在 <data> 下嵌套的 <value> 个元素中。<value> 个元素也可能在 <resheader> 中找到,但这些通常是不用于翻译的元数据。

代码示例

<?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: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: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, 版本=4.0.0.0, Culture=建议, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, 版本=4.0.0.0, Culture=建议, 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>现在这是一个 decsription!(至少对于某些格式)</value>
    备注>这是键的精湛描述!备注>
  </data>
  <data name="key_with_line-break">
    <value>此翻译包含
换行符。</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>---
- 第一项
- 第二项
- 第三项
</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.