Skip to content

Interface Localization (i18n)

Pyxis CMS is designed as a global system, allowing for dynamic changes to the interface language without modifying the source code.

  1. SetLocale Middleware: For every server request, a dedicated Middleware checks the current value in the settings table.
  2. Dynamic Localization: The system injects the selected language into the Laravel application container using app()->setLocale().
  3. Language Files (lang/): All interface texts (navigation labels, form fields, notifications) are stored in standardized .php files.

By utilizing the __() helper and getNavigationLabel() methods, adding a new language to the entire panel is as simple as creating a new folder in the lang/ directory and translating the keys. This eliminates the issue of “hardcoded strings” in the core logic.