> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/nicotine-plus/nicotine-plus/llms.txt
> Use this file to discover all available pages before exploring further.

# Translations

> Guidelines for translating Nicotine+ and improving localization

## How to Translate

You can help improve translations at [Hosted Weblate](https://hosted.weblate.org/engage/nicotine-plus). You don't even need an account.

<Info>
  We regularly import the improved translations into the Nicotine+ GitHub repository, especially before a new release.
</Info>

Look around in the Weblate interface - there are quite a few very practical options available.

### Automatic Translations

This feature will translate all strings that haven't been edited yet.

<Steps>
  <Step title="Open Automatic Translations">
    In the menu, navigate to `Tools -> Automatic translations`.
  </Step>

  <Step title="Configure settings">
    * **Automatic translation mode**: Select `Add as needing edit`
    * **Search filter**: Select `Not translated strings`
    * **Machine translations**: Select `Google Translate`
  </Step>

  <Step title="Wait for completion">
    After letting it run for a while (say 20 minutes), it should have finished and added a halfway decent translation for your language.
  </Step>

  <Step title="Continue translating">
    You can continue with translating by pressing a fitting item in the `String Status`.
  </Step>
</Steps>

### Automatic Suggestions

Whilst translating in normal mode, you can select `Automatic Suggestions`. This is great to see the proposed translations from various translation services.

<Tip>
  Google Translate works very well, but you might find other translations that are more to the point.
</Tip>

### Zen Mode

In Zen mode you can check and improve all items you have selected.

### Search and Replace

Using consistent terms for the same things makes the translation easier to understand. You may also find that some words are mistranslated by the engines, for example `shares` is often translated as `shares from the stockmarket` and not as in `sharing files and directories`.

You can use the `Search and Replace` tool to help you with that.

### Underscores in Strings

In case you are wondering what to do with the underscores, the Alt-shortcuts (called mnemonics in GTK) provide quick access to a visible UI element (button, menu item etc).

<Info>
  If you open any menu and hold down the Alt-key you will see some letters will get an underline. Pressing Alt and the underlined key is the same as pressing that menu item with the mouse.
</Info>

For example, you can translate `_Quit` to `_Cerrar`. If in the same menu the `C` is already in use, simply put the underscore in front of another letter. Of course the `C` is the most prominent letter in the word, so use `_C` if possible.

<Note>
  Our first priority is to get all strings translated. Please use an underscore in the translated string if the original string also has one. Just pick the letter that strikes you as most suitable. Getting the right underscore next to the right letter is something that's easier to do if you see Nicotine+ running with the updated translation strings.
</Note>

## Suggesting Improvements to Source Strings

We love suggestions! If a string in the original English version seems odd or can be improved, please create an issue, and we will think about it and discuss it.

<Warning>
  If you simply edit a string to your liking, we may never notice and then a good idea is lost, or you may create confusion because of a problem you have never thought about.
</Warning>

Please translate all strings as literal as possible, and discuss your thoughts in an issue.

## Conflicts with Other Translators

<Warning>
  If you notice another translator is undoing your translations, please don't revert it back, but add a comment to the string, and discuss with the other translator about the best translation.
</Warning>

## Testing Updated Translations

After translating, you can test your translation by running Nicotine+ with the new translations.

<Info>
  Nicotine+ will first try to find your translation files in your project folder, which is particularly useful for testing translations from the git source tree or if you are using the Python virtualenv framework.
</Info>

In order to use the updated translations when running Nicotine+ from your project folder, you need to generate `.mo` files:

<Steps>
  <Step title="Build the translations">
    ```sh theme={null}
    python3 -m build
    ```
  </Step>

  <Step title="Locate the files">
    The newly generated files will end up in the `pynicotine/locale/` folder.
  </Step>
</Steps>

## Testing Different Languages

Nicotine+ will try to automatically detect your language based on the system locale, or it can be manually selected in `Preferences -> User Interface -> Language` (requires a restart).

## Adding Yourself to Translators

If you want, you can add yourself to:

* [AUTHORS.md](https://github.com/nicotine-plus/nicotine-plus/blob/HEAD/AUTHORS.md)
* The credits list in `Help -> About`: [pynicotine/gtkgui/dialogs/about.py](https://github.com/nicotine-plus/nicotine-plus/blob/HEAD/pynicotine/gtkgui/dialogs/about.py)

<Tip>
  Add yourself to the top of matching section and then create a PR (pull request).
</Tip>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.