Skip to content

Commit

Permalink
docs: improve translation help
Browse files Browse the repository at this point in the history
  • Loading branch information
Otiel committed Apr 10, 2019
1 parent 32fceca commit e54ea23
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion docs/help-translate.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,18 @@ Translations are stored in resources (_resx_) files, one file per language. As o
* English: [_Resources.resx_](/src/BandcampDownloader/Properties/Resources.resx)
* French: [_Resources.fr.resx_](/src/BandcampDownloader/Properties/Resources.fr.resx)

In order to modify the translations, you can either edit the files with your favorite text editor, or use a tool such as [Zeta Resource Editor](https://www.zeta-resource-editor.com).
In order to modify the translations, you can either edit the files with your favorite text editor, or use a tool such as [Zeta Resource Editor](https://www.zeta-resource-editor.com). When editing a _resx_ file with a text editor, you will find the translations at the end of the file. A translation looks like this:
```
<data name="buttonStart" xml:space="preserve">
<value>Start _download</value>
</data>
```

Only the `<value>...</value>` tag should be modified. The `name=` attribute should give you some context in addition to the English translation.

Make sure you keep an access key (also called mnemonic) when there is one: the underscore character `_` should precede the letter used as the access key. Ideally, there shouldn't be any duplicate mnemonics on the same window.

## Create a new language

If you wish to create a new language file, simply duplicate the English file (_Resources.resx_) in the same place and rename it using the correct [culture code](https://docs.microsoft.com/en-us/dotnet/api/system.globalization.cultureinfo?view=netframework-4.7.2#culture-names-and-identifiers) (for instance: _Resources.fr.resx_, _Resources.fr-CA.resx_...):

Expand Down

0 comments on commit e54ea23

Please sign in to comment.