RESX

Last updated: October 21, 2024Author: 
resx
File format value
resx

RESX (.resx) file format is an XML-based format used by the .NET framework to store resources for different data types, such as strings, images, and other objects. It's commonly used for internationalization (i18n) and localization (l10n) of applications developed with .NET technologies.

File format example

<?xml version="1.0" encoding="utf-8"?>
<root>
  <data name="WelcomeMessage" xml:space="preserve">
    <value>¡Bienvenido a nuestra aplicación!</value>
    <comment>Este es el mensaje de bienvenida mostrado en la pantalla principal.</comment>
  </data>
  <data name="ExitMessage" xml:space="preserve">
    <value>¿Está seguro de que quiere salir?</value>
    <comment>Mensaje que pregunta si el usuario desea salir de la aplicación.</comment>
  </data>
  <data name="SubmitButton" xml:space="preserve">
    <value>Enviar</value>
    <comment>Texto en el botón de enviar.</comment>
  </data>
</root>

Pluralization and variables

RESX files don't have built-in support for pluralization or variables. To handle pluralization, you can create multiple keys for different plural forms. For example, you can create keys like FoundFile, FoundFiles, and FoundFilesPlural to handle different plural forms.

Upload and download translation files

Use the SimpleLocalize CLI to upload and download translations in the QT Linguist format. Use resx value as the format argument, provide the path to the translation file and the language key for upload.

Upload source translations in RESX format

simplelocalize upload --apiKey <PROJECT_KEY> \
  --format resx \
  --languageKey en \
  --path ./Strings.resx

Learn more about uploading translations with CLI.

Download translations to QT Linguist format

simplelocalize download --apiKey <PROJECT_KEY> \
  --format resx \
  --path ./Strings.{lang}.resx

Learn more about downloading translations with CLI.

Resources

Was this helpful?