Text Replacement - libass/libass GitHub Wiki
This feature allows authors to provide multiple versions of their subtitles within a single track, letting the user choose which format to use. Common uses include dis/enabling honorifics, localized names, puns, and in-universe terms, and TL notes.
- Honorifics (
hr) - General localization (
lo) - TL notes (
nt) - Light typesetting (
lt)
Using these types is not required, but it allows users to more easily set presets in their player configuration, and the standard is expected to expand over time.
Format:
Replacement: <title>,<description>,<code>,<default>
Example:
[Replacements]
Replacement: Honorifics,"-kun"\, "-chan"\, etc…,hr,off
Replacement: Localization,Generally localizing terms,lo,on
Replacement: Mahjong terms,"Suji", "Dora", etc…,lo/mj,default
Replacement: Item names,"Godrobe", "Omnisilk",lo/it,on
As seen here, <code> may use path-style syntax. There are no limits on the length of replacement codes, but keeping them short is likely convenient for content authors. Sub-replacements must have a parent. Players should organize sub-replacements into a tree-like menu. Using codes consistently allows the user to set defaults in their player. In this example, if the user has their player configured to disable "General localization" (lo), then when the file is loaded, Mahjong terms (lo/mj) will be disabled, but Item names (lo/it) will be enabled unless the user also has a lo/it preference set. These options must be adjustable both globally in the player configuration, and during playback per-file.
Could you come over here, <hr-Mr. >Nagoyama<hr+-san>?
- Nested replacements are allowed, but be careful