This guide provides everything you need to use, modify, and add translations for the ModernZ OSC interface.
- Quick Start
- Available Languages
- Adding a New Language
- Updating Existing Translations
- Translation Keys Reference
- Contributing Translations
To get started with translations:
- Locate the translation file: Open the
modernz-locale.lua
file from the repository (typically found at modernz-locale.lua). - Edit Translations: Use the following format to add or modify translations:
["language-code"] = { welcome = "Your translation", off = "Your translation", -- ... other strings }
- Replace
"language-code"
with your language code (e.g., "es" for Spanish).
ModernZ currently has translations for the following languages:
- French (fr)
- German (de)
- Spanish (es)
- Polish (pl)
- Japanese (jp)
- Simplified Chinese (zh)
- Arabic (ar)
-
Get the translation file: If you haven't already, download the
modernz-locale.lua
file. -
Open the file: Open
modernz-locale.lua
in a text editor. -
Choose a language code: Pick a unique code representing your language (e.g., "it" for Italian).
-
Copy an existing template: Use an existing language section as a base. For example, use the English template:
["en"] = { welcome = "{\\fs24\\1c&H0&\\1c&HFFFFFF&}Drop files or URLs to play here", off = "OFF", na = "n/a", none = "None available", video = "Video", audio = "Audio", subtitle = "Subtitle", nosub = "No subtitles available", noaudio = "No audio tracks available", track = " tracks:", playlist = "Playlist", nolist = "Empty playlist.", chapter = "Chapter", nochapter = "No chapters.", ontop = "Pin window", ontopdisable = "Unpin window", loopenable = "Enable loop", loopdisable = "Disable loop", screenshot = "Screenshot", screenshotsaved = "Screenshot saved", statsinfo = "Information" },
-
Translate the strings: Replace the English text with your translations, keeping the same keys.
["es"] = { welcome = "{\\fs24\\1c&H0&\\1c&HFFFFFF&}Suelta archivos o URLs aquí para reproducirlos", off = "APAGADO", na = "n/d", -- ... translate other strings },
-
Find your language: Locate the section for your language in
modernz-locale.lua
. -
Update the strings: ensuring you preserve any formatting codes.
(e.g.,
{\\fs24\\1c&H0&\\1c&HFFFFFF&}
). -
Test your changes: Play a video to verify the translations work correctly.
Key | Description | Format Notes |
---|---|---|
welcome | Welcome message | Preserve formatting codes |
off | Off state text | Keep short |
na | Not available | Keep short |
none | Nothing available | Generic unavailable message |
video | Video label | Menu label |
audio | Audio label | Menu label |
subtitle | Subtitle label | Menu label |
track | Tracks suffix | Follows numbers |
playlist | Playlist label | Menu label |
chapter | Chapter label | Menu label |
ontop/ontopdisable | Window pin states | Action labels |
loopenable/loopdisable | Loop states | Action labels |
screenshot | Screenshot label | Action label |
screenshotsaved | Screenshot confirmation | Status message |
statsinfo | Information label | Menu label |
If you'd like to share your translations with the community:
-
Fork the repository: Visit the ModernZ GitHub page (https://github.com/Samillion/ModernZ) and click "Fork" to create your own copy of the project.
-
Edit the
modernz-locale.lua
file Add your translations to the file in your forked repository. -
Submit a Pull Request Create a pull request on GitHub to propose your changes for review and integration.
Thanks for contributing ❤️ Every translation helps make the project better!