How to Use a Specific Language File in UnRAR

This guide explains how to configure the command-line utility unrar to display localized output using a specific language file. While unrar does not feature a dedicated runtime command-line switch to select languages on the fly, it determines its language output through external language definition files—specifically rar.lng—or through system locale variables depending on your platform and build.

Understanding How UnRAR Handles Language Files

By design, command-line versions of RAR and UnRAR search for a localized message file named rar.lng located in the same directory as the executable. If this file is present and matches the version of the software, unrar uses it to translate console messages, prompts, and error outputs. If the file is missing, the utility defaults to its built-in English strings.

Method 1: Specifying the Language File via rar.lng

To instruct unrar to use a specific language file, you must make that file available to the executable under the default expected name:

  1. Locate the Language Files: Obtain the localized .lng file corresponding to your desired language (for example, german.lng, french.lng, or spanish.lng) compatible with your UnRAR version.
  2. Rename the Target File: Rename your desired language file to rar.lng.
  3. Place the File Next to the Executable: Move the newly renamed rar.lng file into the directory containing your unrar executable (e.g., C:\Program Files\WinRAR\ on Windows or /usr/local/bin/ on Unix-like systems).

When unrar runs, it will detect rar.lng in its working binary directory and display console text in the selected language.

If you need to switch between multiple language files dynamically in a Unix or script-based environment, use symbolic links instead of repeatedly copying files:

  1. Store your language files in a dedicated directory:

    /opt/unrar/lang/en.lng
    /opt/unrar/lang/de.lng
    /opt/unrar/lang/fr.lng
  2. Create a symbolic link pointing the target language to rar.lng in the same directory as the unrar binary:

    ln -sf /opt/unrar/lang/de.lng /usr/local/bin/rar.lng
  3. Run your command:

    unrar x archive.rar

Changing the target of the rar.lng symlink instructs unrar to load a different localization profile for subsequent operations.

Method 3: System Locale Configuration (Package Builds)

If your version of unrar was installed via a Linux package manager and compiled with GNU gettext support rather than standalone .lng files, localized output is controlled directly through environment variables rather than external .lng files.

To force a specific language output for a single execution, prefix the command with the LC_ALL or LANG variable:

LC_ALL=de_DE.UTF-8 unrar l archive.rar

Replace de_DE.UTF-8 with your desired installed system locale (e.g., es_ES.UTF-8, fr_FR.UTF-8).

Verifying the Configuration

To confirm that unrar is using your specified language file, execute the help command:

unrar -?

Inspect the header and syntax descriptions. If the output appears in your chosen language, the file has been loaded properly. If it appears in English, verify file permissions and ensure that rar.lng is located in the exact directory of the binary being executed.