# How to Translate .resx Files in a .NET Project | Vitra.ai

> Resx files hold strings, images and files in one XML schema. Translating the wrong node type is what corrupts them as well across the whole state.

**Canonical URL**: https://www.vitra.ai/general/translate-resx-files
**Source**: This is the Markdown rendering of https://www.vitra.ai/general/translate-resx-files, generated at build time from that page.

---

4 min read

# How to Translate .resx Files in a .NET Project

Resx files hold strings, images and files in one XML schema. Translating the wrong node type is what corrupts them as well across the whole state.

[Samhitha J Bhatt](https://www.vitra.ai/author/samhitha)
Senior Product Manager , Vitra.ai
Updated Aug 17, 2026

![How to Translate .resx Files in a .NET Project](https://www.vitra.ai/static/images/blog/translate-resx-files.jpg)

Table of contents

[Not every resource is a string](#not-every-resource-is-a-string)

[The name attribute is the key](#the-name-attribute-is-the-key)

[Satellite assemblies and culture codes](#satellite-assemblies-and-culture-codes)

[Placeholders are composite format items](#placeholders-are-composite-format-items)

[Designer files are generated](#designer-files-are-generated)

[Why the incremental case dominates](#why-the-incremental-case-dominates)

[The route through](#the-route-through)

[WinForms designers store layout in the resource file](#winforms-designers-store-layout-in-the-resource-file)

[Where to start](#where-to-start)

[FAQ](#faq)

Contributors

[Samhitha J Bhatt](https://www.vitra.ai/author/samhitha)
Senior Product Manager

Subscribe to our newsletter

Subscribe

> **Quick answer —** A .resx file is XML holding named resources — strings, but also embedded images and file references. Only string values get translated, the name attribute is the lookup key, and the satellite assembly naming decides whether .NET ever loads the result.

## Not every resource is a string

Resx is a general resource container. Most entries are `<data>` nodes holding text, but the same file can hold embedded images, icons and binary blobs referenced through `<data type=...>` with a `mimetype`. A process that treats the whole file as text will attempt to translate a base64-encoded icon. The result is a corrupt resource and a runtime exception.

Filter to string nodes before anything else.

## The name attribute is the key

`<data name="Checkout_Submit">` is what the code requests through the resource manager. The child `<value>` is what a user reads.

Same rule as every other resource format, and the same silent failure when it is broken: a missing key falls back to the neutral culture and the string appears in English.

## Satellite assemblies and culture codes

.NET compiles translated resx files into satellite assemblies organised by culture — `fr`, `fr-CA`, `pt-BR`. The folder and file naming has to match the culture the application requests. Neutral versus specific cultures matter here. A `fr` resource serves both France and Canada unless a `fr-CA` exists, which is a useful fallback chain and a common source of confusion when a specific culture is expected and a neutral one is found.

## Placeholders are composite format items

.NET uses `{0}`, `{1}`, and increasingly interpolated strings. In resx the composite format items must survive exactly, and their order can change for word order while their indices stay bound to their arguments.

Braces intended as literal text must be doubled — `{{` — and translations that introduce an unescaped brace throw a format exception at runtime rather than displaying wrongly.

## Designer files are generated

`Resources.Designer.cs` is generated from the resx and provides strongly typed access. It should never be edited by hand and never translated. If it appears in a translation scope, the scope is wrong.

## Why the incremental case dominates

Enterprise .NET applications carry very large resource sets that change a little each release. [translation memory](https://www.vitra.ai/features/translation-memory) makes the recurring cost proportional to the diff rather than the bundle, and keeps a term identical across every screen that uses it.

## The route through

Upload the resx set, filter to string nodes, lock the name attributes, protect format items, translate, and confirm the culture naming on export. [document translation](https://www.vitra.ai/features/document-translation) handles the XML and [quality control](https://www.vitra.ai/features/quality-control) verifies the format items.

Schema and naming specifics are on the [resx translation integration](https://www.vitra.ai/integration/resx-translation) page.

## WinForms designers store layout in the resource file

In older WinForms projects the designer writes control positions and sizes into the resx alongside the strings. Translated text that runs longer does not reflow, and the control keeps whatever width the designer recorded.

That is why some translated desktop applications show truncated button labels. The string is correct and the layout value sitting beside it was never revisited.

## Where to start

Build one satellite assembly and switch the culture at runtime. If the strings change, the naming is right and the rest is volume.

## FAQ

**What should be translated in a .resx file?** Only string values. The same file can hold embedded images and binary blobs, and a process that treats everything as text will try to translate a base64-encoded icon, producing a corrupt resource.

**What is the name attribute for?** It is the lookup key the resource manager requests. Changing it means the key is not found, so .NET falls back to the neutral culture and the string appears in English with no error.

**How does .NET decide which translation to load?** Through satellite assemblies organised by culture code. A neutral culture like fr serves both France and Canada unless a specific fr-CA exists, which is a useful fallback and a frequent source of confusion.

**Why does a translation throw a format exception?** Usually an unescaped brace. Composite format items like 0 must survive exactly and literal braces must be doubled, so a translation that introduces a stray brace fails at runtime rather than displaying wrongly.

Our blog

## Lastest blog posts

Tool and strategies modern teams need to help their companies grow.

Automotive

[Automotive Brochure Localization by Market](https://www.vitra.ai/automotive/automotive-brochure-localization)
A car brochure is a spec grid, a legal footer and a photo library, all market-specific. What actually has to change, and why the layout decides the schedule.

[Samhitha J Bhatt](https://www.vitra.ai/author/samhitha)
Aug 18, 2026

Automotive

[Automotive Campaign Localization Across Markets](https://www.vitra.ai/automotive/automotive-campaign-localization)
Campaigns run through national companies and dealer networks, so one master becomes hundreds of files. Where the offer text and the disclaimers actually break.

[Samhitha J Bhatt](https://www.vitra.ai/author/samhitha)
Aug 18, 2026

Automotive

[Car Service Manual Translation for Technicians](https://www.vitra.ai/automotive/automotive-service-manual-translation)
A workshop manual is read mid-repair by someone with the car on a lift. What that demands of procedures, torque figures and fault codes, in every language.

[Samhitha J Bhatt](https://www.vitra.ai/author/samhitha)
Aug 18, 2026

[View all posts](https://www.vitra.ai/blog/page/1)

---

## Structured data

```json
{
  "@context": "https://schema.org",
  "@type": "Article",
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://www.vitra.ai/general/translate-resx-files"
  },
  "headline": "How to Translate .resx Files in a .NET Project",
  "image": [
    {
      "@type": "ImageObject",
      "url": "https://www.vitra.ai/static/images/blog/translate-resx-files.jpg"
    }
  ],
  "datePublished": "2026-08-17T00:00:00.000Z",
  "dateModified": "2026-08-17T00:00:00.000Z",
  "author": [
    {
      "@type": "Person",
      "name": "Samhitha J Bhatt"
    }
  ],
  "publisher": {
    "@type": "Organization",
    "name": "Vitra.ai",
    "logo": {
      "@type": "ImageObject",
      "url": "https://www.vitra.ai/static/images/vitra-v-logo.png"
    }
  },
  "description": "Resx files hold strings, images and files in one XML schema. Translating the wrong node type is what corrupts them as well across the whole state."
}
```

```json
{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    {
      "@type": "ListItem",
      "position": 1,
      "name": "Home",
      "item": "https://www.vitra.ai"
    },
    {
      "@type": "ListItem",
      "position": 2,
      "name": "General",
      "item": "https://www.vitra.ai/general"
    },
    {
      "@type": "ListItem",
      "position": 3,
      "name": "How to Translate .resx Files in a .NET Project",
      "item": "https://www.vitra.ai/general/translate-resx-files"
    }
  ]
}
```

```json
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "What should be translated in a .resx file?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Only string values. The same file can hold embedded images and binary blobs, and a process that treats everything as text will try to translate a base64-encoded icon, producing a corrupt resource."
      }
    },
    {
      "@type": "Question",
      "name": "What is the name attribute for?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "It is the lookup key the resource manager requests. Changing it means the key is not found, so .NET falls back to the neutral culture and the string appears in English with no error."
      }
    },
    {
      "@type": "Question",
      "name": "How does .NET decide which translation to load?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Through satellite assemblies organised by culture code. A neutral culture like fr serves both France and Canada unless a specific fr-CA exists, which is a useful fallback and a frequent source of confusion."
      }
    },
    {
      "@type": "Question",
      "name": "Why does a translation throw a format exception?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Usually an unescaped brace. Composite format items like {0} must survive exactly and literal braces must be doubled, so a translation that introduces a stray brace fails at runtime rather than displaying wrongly."
      }
    }
  ]
}
```
