Fitxers de recursos de .NET (RESX, RESW)

Un fitxer de recursos XML .NET utilitza un format de fitxer XML monolingüe que s’utilitza a les aplicacions de Microsoft .NET.

Pot utilitzar l’extensió .resx o .resw. Malgrat la diferència d’extensió de fitxer, el format de fitxer .resw és idèntic al format de fitxer .resx, excepte que els fitxers .resw només poden contenir cadenes i camins de fitxer.

Fitxer d’exemple:

<?xml version="1.0" encoding="utf-8"?>
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<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="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</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:choice>
</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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Hello" xml:space="preserve" weblate-flags="c-format, max-length:100">
<value>Hello, world!</value>
</data>
<data name="Orangutan" xml:space="preserve">
<value>Orangutan has %d banana.</value>
</data>
<data name="Try" xml:space="preserve">
<value>Try Weblate at https://demo.weblate.org/!</value>
</data>
<data name="Thanks" xml:space="preserve">
<value>Thank you for using Weblate.</value>
</data>
</root>
Supported features

File extensions

.resx

Lingualitat

Monolingual

Supports plural

No

Supports descriptions

Yes

Admet l’explicació

No

Supports context

No

Supports location

No

Supports flags

Yes

API identifier

resx

Admet cadenes de només lectura

No

Supports removing obsolete strings

No

Configuració del Weblate

Placa web típica Configuració dels components

Filtre de fitxers

Resources/Language.*.resx

Fitxer de llengua base monolingüe

Resources/Language.resx

Plantilla per a traduccions noves

«Buit».

Format de fitxer

.NET resource file