XOOPS 2.7.0 ships with English language files only. Translations into other languages are maintained by the community and distributed through GitHub and the various local XOOPS support sites.
- GitHub — community translations are increasingly published as separate repositories under the XOOPS organization and on individual contributors' accounts. Search GitHub for
xoops-language-<your-language>or browse the XOOPS organization for current packages. - Local XOOPS support sites — many regional XOOPS communities publish translations on their own sites. Visit https://xoops.org and follow the links to local communities.
- Module translations — translations for individual community modules typically live next to the module itself in the
XoopsModules25xGitHub organization (the25xin the name is historical; modules there are maintained for both XOOPS 2.5.x and 2.7.x).
If a translation for your language already exists, drop the language directories into your XOOPS install (see "How to install a translation" below).
XOOPS 2.7.0 keeps language files next to the code that consumes them. A complete translation covers all of these locations:
- Core —
htdocs/language/english/— site-wide constants used by every page (login, common errors, dates, mail templates, etc.). - Installer —
htdocs/install/language/english/— strings shown by the installation wizard. Translate these before running the installer if you want a localized install experience. - System module —
htdocs/modules/system/language/english/— by far the largest set; covers the entire admin Control Panel. - Bundled modules — each of
htdocs/modules/pm/language/english/,htdocs/modules/profile/language/english/,htdocs/modules/protector/language/english/, andhtdocs/modules/debugbar/language/english/. - Themes — a handful of themes ship their own language files; check
htdocs/themes/<theme>/language/if it exists.
A "core only" translation is the minimum useful unit and corresponds to the first two bullets above.
-
Copy the
english/directory next to it and rename the copy to your language. The directory name should be the lowercase English name of the language (spanish,german,french,japanese,arabic, etc.).htdocs/language/english/ → htdocs/language/spanish/ -
Open each
.phpfile in the new directory and translate the string values inside thedefine()calls. Do not change the constant names — they are referenced from PHP code throughout the core.// Before: define('_CM_COMDELETED', 'Comment(s) deleted.'); define('_CM_COMDELETENG', 'Could not delete comment.'); define('_CM_DELETESELECT', 'Delete all its child comments?'); // After (Spanish): define('_CM_COMDELETED', 'Comentario(s) eliminado(s).'); define('_CM_COMDELETENG', 'No se pudo eliminar el comentario.'); define('_CM_DELETESELECT', '¿Eliminar también todos sus comentarios secundarios?');
-
Save every file as UTF-8 without BOM. XOOPS 2.7.0 uses
utf8mb4end-to-end (database, sessions, output) and rejects files with a byte-order mark. In Notepad++ this is the "UTF-8" option, not "UTF-8-BOM". In VS Code it is the default; just confirm the encoding in the status bar. -
Update the language and charset metadata at the top of each file to match your language:
// _LANGCODE: es // _CHARSET : UTF-8 // Translator: Your Name
_LANGCODEshould be the ISO 639-1 code for your language._CHARSETis alwaysUTF-8in XOOPS 2.7.0 — there is no longer an ISO-8859-1 variant. -
Repeat for the installer, the System module, and any bundled modules you need.
If you obtained a finished translation as a directory tree:
- Copy each
<language>/directory into the matchinglanguage/english/parent in your XOOPS install. For example, copylanguage/spanish/intohtdocs/language/,install/language/spanish/intohtdocs/install/language/, and so on. - Make sure file ownership and permissions are readable by the web server.
- Either select the new language at install time (the wizard scans
htdocs/language/for available languages) or, on an existing site, change the language in Admin → System → Preferences → General Settings.
Please contribute your translation back to the community.
-
Create a GitHub repository (or fork an existing language repository if one exists for your language).
-
Use a clear name such as
xoops-language-<language-code>(e.g.xoops-language-es,xoops-language-pt-br). -
Mirror the XOOPS directory structure inside your repository so files line up with where they get copied:
xoops-language-es/ ├── language/spanish/(files).php ├── install/language/spanish/(files).php └── modules/system/language/spanish/(files).php -
Include a
README.mddocumenting:- Language name and ISO code
- XOOPS version compatibility (e.g.
XOOPS 2.7.0+) - Translator and credits
- Whether the translation is core-only or covers bundled modules
-
Open a pull request against the relevant module/core repository on GitHub or post an announcement on https://xoops.org so the community can find it.
Note
If your language requires changes to the core for date or calendar formatting, include those changes in the package as well. Languages with right-to-left scripts (Arabic, Hebrew, Persian, Urdu) work out of the box in XOOPS 2.7.0 — RTL support was added in this release and individual themes pick it up automatically.