Localize a Plex library: English genre, mood and style labels become translations, cast names become the chosen language's names, Chinese titles get a pinyin sort key. The caller names the language.
PlexAssistant's scanner calls it per item after the media rows are written; the localize binary and the Docker image run the same pass standalone: the library database says what is there, titles, labels, directors and writers go through the Plex API, and nothing of the pass's own is stored.
- Pinyin sort key (
sort): the title as pinyin initials; 重慶森林 sorts asCQSL. Chinese only (zh-Hans,zh-Hant). - Tag translation (
tags): English genre, mood and style labels become the chosen language's, Action becomes 动作. A label with no entry is left as stored. - Cast translation (
people): director and writer names go through the API; an actor moves to the translated row the library already has, and one without a row keeps the original name. - Lock and restore: written fields are locked, so a metadata refresh does not overwrite them;
unlockdrops the locks, and the next refresh puts the source values back.
zh-Hans, zh-Hant, ja, ko, ar, fr, ru, es. zh-Hans is the default.
| Variable | Meaning |
|---|---|
LOCALIZE |
The work to do: sort, tags, people, comma-separated. Unset is off. |
LOCALIZE_LANG |
One of the languages above. Unset or unknown means zh-Hans. |
LOCALIZE_UNLOCK |
Any value but empty or 0 drops the locks. |
LOCALIZE_EVERY |
How often watch repeats (30m, 6h); 6h by default. Standalone only. |
PLEX_URL |
The Plex server, http://127.0.0.1:32400 by default. Standalone only. |
PLEX_TOKEN |
The Plex token; unset reads the Preferences.xml in /config. Standalone only. |
TMDB_API_KEY |
Another TMDB v3 key. Unset uses the built-in one. |
GPL-3.0, like PlexAssistant. The built-in traditional-to-simplified table comes from OpenCC under Apache-2.0; its notice stays at the top of the file.