Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ Welcome, and nothing to disclose. Two rules:

The sign-off covers AI-assisted code too.

## Translations

Interface strings live in [`lang/`](lang/). See [lang/README.md](lang/README.md) for the file format and how to add or update a language.

## Bugs

Open an issue with the version, OS, command used, and expected vs actual result.
Expand Down
2 changes: 1 addition & 1 deletion lang/English.txt
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ Max Depth
Maximum external depth:
Maximum external depth:
Filters (refuse/accept links) :
Filters (refuse/accept links) :
Filters (refuse/accept links):
Paths
Paths
Save prefs
Expand Down
37 changes: 37 additions & 0 deletions lang/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Translating HTTrack

Interface strings live here, one `.txt` file per language. `English.txt` is the reference: every other file maps each English string to its translation.

## File format

Plain text, entries in consecutive pairs of lines:

```
<English string>
<translation>
```

The first line of a pair is the lookup key and must stay identical to the one in `English.txt`; translate only the second line. Missing entries fall back to the English text at runtime, so a partial translation works.

Preserve any `\r\n`, `\t` and `printf` placeholders (`%s`, `%d`, ...) in the translation.

A few `LANGUAGE_*` entries at the top describe the file itself:

| Key | Meaning |
| --- | --- |
| `LANGUAGE_NAME` | Name shown in the language picker, in its own language (`Deutsch`, not `German`) |
| `LANGUAGE_ISO` | ISO 639 code, with region if needed (`de`, `pt_BR`) |
| `LANGUAGE_CHARSET` | Encoding the file is saved in (`ISO-8859-1`, `windows-1251`, `UTF-8`, ...) |
| `LANGUAGE_AUTHOR` | Your name and contact |
| `LANGUAGE_WINDOWSID` | Windows locale name used by WinHTTrack (`German (Standard)`) |

Save the file in exactly its declared `LANGUAGE_CHARSET`; an editor that rewrites it as UTF-8 will corrupt the non-ASCII bytes.

## Adding or updating a language

1. Copy `English.txt` to `<Language>.txt`, or edit the existing file.
2. Translate each second line; leave the English keys untouched.
3. Fill in the `LANGUAGE_*` header for a new file.
4. Open a pull request, or attach the file to a GitHub issue.

When new strings land in `English.txt` they show up untranslated (as English) until a translator fills them in.
Loading