Skip to content

Move language configuration to a dedicated lang.php config file #151

Description

@armanist

Currently, the main Quantum config file (config/config.php) includes language-related settings such as multilang, langs, lang_default, and lang_segment.
To improve maintainability and separation of concerns, these settings should be moved into a dedicated config/lang.php file.

Tasks:

  1. Create a new file: config/lang.php

  2. Move the following keys from config/config.php into it:

  • multilang
  • langs
  • lang_default
  • ang_segment
  1. Ensure the new config file structure follows the same commenting and formatting style used in other Quantum config files.

  2. Update the framework to load lang.php config automatically when language functionality is used.

  3. Remove the moved keys from config/config.php.

Example:
New config/lang.php sample:

<?php

return [
    /**
     * ---------------------------------------------------------
     * Multilingual support
     * ---------------------------------------------------------
     *
     * Enables or disables multi-language support
     */
    'multilang' => true,

    /**
     * ---------------------------------------------------------
     * Supported languages
     * ---------------------------------------------------------
     */
    'langs' => ['en', 'ru', 'am'],

    /**
     * ---------------------------------------------------------
     * Default language
     * ---------------------------------------------------------
     */
    'lang_default' => 'en',

    /**
     * ---------------------------------------------------------
     * URL segment for language
     * ---------------------------------------------------------
     *
     * Defines which segment in the URL indicates the language
     */
    'lang_segment' => 1,
];

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions