-
Notifications
You must be signed in to change notification settings - Fork 23
translations
Shadowsun™ edited this page Sep 20, 2026
·
1 revision
Cinema ships with 20+ locale files. Missing keys always fall back to English.
cinema_modded/gamemode/i18n/
init.lua -- loader
schema.lua -- authoritative list of required keys
colors.lua
languages/
en.lua -- English (fallback)
de.lua
fr.lua
…
- Copy
en.luato a new file, e.g.languages/pt.lua. - Translate every string value. Keep the keys identical.
- Set the metadata at the top:
return {
Name = "Português",
Author = "YourName",
-- … all other keys
}- Restart the client / server. The language appears in the scoreboard settings if the file is valid.
schema.lua lists every key the gamemode expects.
When you add a new user-facing string in Lua, also add the key to the schema and to every language file (or at least to en.lua).
Examples of key groups:
-
Theater_*– announcements (requested, skipped, paused, …) -
Queue_*/Request_*– queue & request UI -
Rent_*– theater renting UI -
Warning_*/Dependency_*– missing map / codec warnings
-- Simple key
theater.GetTranslation("Theater_RequestFailed")
-- Key with format arguments
theater.GetTranslation("Theater_VideoRequestedBy", ply:Nick())On the client the same helpers are available; the active language is chosen from the player’s setting / ConVar.
- Never hard-code English UI strings in new features; always go through the translation system.
- Keep format placeholders consistent (
%s,%d, …) across languages. - Test with a non-English locale to catch missing keys early.
- Rent-related strings use the
Rent_prefix – keep that convention.