Skip to content
Novus Examples
resx2.7 KB

.NET RESX — composite format strings (English (United States))

A English (United States) resource file built around composite format strings — {0:N2}, {2:P1}, {0:C}, {0:d} and {0:t} — whose rendered output depends entirely on CultureInfo. Includes a whitespace-significant resource guarded by xml:space, and documents the suffixed-key convention .NET falls back on because String.Format has no plural selector.

Preview — first 50 linesresx
<?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:element name="root" msdata:IsDataSet="true" />
  </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>
  <!-- English (United States) (en-US) -->
  <data name="BrowserTitle" xml:space="preserve">
    <value>Files</value>
    <comment>Window title for the file browser</comment>
  </data>
  <data name="MoveToTrash" xml:space="preserve">
    <value>Move to trash</value>
    <comment>Context-menu item</comment>
  </data>
  <data name="MoveConfirm" xml:space="preserve">
    <value>Move {0} to {1}?</value>
    <comment>{0} source name, {1} destination name</comment>
  </data>
  <data name="ReplaceConfirm" xml:space="preserve">
    <value>Replace {0} with {1}?</value>
    <comment>Argument order may change per culture</comment>
  </data>
  <data name="QuotaUsed" xml:space="preserve">
    <value>{0:N2} GB of {1:N2} GB used ({2:P1})</value>
    <comment>N2 = fixed 2 decimals, P1 = percent with 1 decimal</comment>
  </data>
  <data name="InvoiceTotal" xml:space="preserve">
    <value>Total: {0:C}</value>
    <comment>C = currency of the CURRENT culture, not of the amount</comment>
  </data>
  <data name="LastSynced" xml:space="preserve">
    <value>Last synced {0:d} at {0:t}</value>
    <comment>d = short date, t = short time</comment>
  </data>
  <data name="FileCount_One" xml:space="preserve">
    <value>{0} file</value>
    <comment>Selected when count == 1</comment>
  </data>
64 lines total — download for the full file.

Specifications

Format
.NET RESX (XML resource)
Culture
en-US
Resources
11
Format Specifiers
N2, P1, C, d, t
Plural Convention
suffixed keys (_One/_Other) — .NET has no plural selector
Whitespace Resource
ListSeparator (xml:space="preserve")
Role
neutral
Seed
20260807
Wave
p7
Line Endings
LF

Testing contract

Expected to pass
Scenario
Load as a neutral or satellite resource and format each entry under CultureInfo("en-US").
Expected result
N2 and C render with this culture's separators and currency, d and t with its date and time patterns, and ListSeparator keeps its trailing space. The PluralConventionNote resource states how many plural keys the language actually needs — two for English, four for Polish, six for Arabic.

What is a .resx file?

.resx is a .NET XML resource file that stores localizable strings (and other resources) as name/value data elements, with a standard header block declaring the ResX schema and reader/writer types. Per-culture files like Resources.es.resx provide translations that the .NET runtime resolves by culture.

How to use this file

Use an example .resx file to test .NET resource parsers, Visual Studio resource editors, RESX-to-other-format converters, and satellite-assembly localization tooling.

How to use this file for testing

“.NET RESX — composite format strings (English (United States))” is a deterministic Novus Examples fixture for Internationalization, Localization catalogs, Config parsing. Parallel text and accented, multi-script content — for testing translation pipelines, Unicode handling, and localization tooling.

Documented properties for this file: seed 20260807 · neutral · LF. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.

Translation-catalog fixtures carry the same message set across formats, each with its native placeholder syntax. Test your i18n loader, catalog converter, or translation-memory tool, and use the RTL and CJK variants to check bidirectional text and Unicode handling.

Load the catalog with your i18n framework and verify placeholder interpolation and plural handling; the RTL and CJK variants exercise bidirectional text and font fallback.

Code examples

import xml.etree.ElementTree as ET

root = ET.parse("Formats.resx").getroot()
for d in root.findall("data"):
    print(d.get("name"), "->", d.findtext("value"))

Generated by generation/localization_p7.py. Free for any use, no attribution required — license.