PHPackages                             brookinsconsulting/bcswitchadminlanguage - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. brookinsconsulting/bcswitchadminlanguage

ActiveEzpublish-legacy-extension[Localization &amp; i18n](/categories/localization)

brookinsconsulting/bcswitchadminlanguage
========================================

eZ Publish Legacy kernel override class extension which provides a stable and flexible solution which allows the user to change the language of the current siteaccess on the fly. Provides for greater multilingual editor access!

193PHP

Since Jun 14Pushed 10y ago1 watchersCompare

[ Source](https://github.com/brookinsconsulting/bcswitchadminlanguage)[ Packagist](https://packagist.org/packages/brookinsconsulting/bcswitchadminlanguage)[ RSS](/packages/brookinsconsulting-bcswitchadminlanguage/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

BC Switch Admin Language
========================

[](#bc-switch-admin-language)

This extension implements a solution to provide the ability to change the administration UI locale (language) on the fly. This solution requires and provides an extension based kernel class overrides to store cache by siteaccess name + locale identifier and switch ini locale per request dynamically for just the one request.

Version
=======

[](#version)

- The current version of BC Switch Admin Language is 0.1.0
- Last Major update: June 14, 2015

Copyright
=========

[](#copyright)

- BC Switch Admin Language is copyright 1999 - 2016 Brookins Consulting
- eZ Publish Kernel classes (used in kernel overrides) are copyright 1999 - 2016 eZ Systems AS.
- See: [COPYRIGHT.md](COPYRIGHT.md) for more information on the terms of the copyright and license

License
=======

[](#license)

BC Document Reader is licensed under the GNU General Public License.

The complete license agreement is included in the [LICENSE](LICENSE) file.

BC Document Reader is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License or at your option a later version.

BC Document Reader is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

The GNU GPL gives you the right to use, modify and redistribute BC Document Reader under certain conditions. The GNU GPL license is distributed with the software, see the file doc/LICENSE.

It is also available at

You should have received a copy of the GNU General Public License along with BC Document Reader in doc/LICENSE. If not, see .

Using BC Document Reader under the terms of the GNU GPL is free (as in freedom).

For more information or questions please contact:

Requirements
============

[](#requirements)

The following requirements exists for using BC Switch Admin Language extension:

### eZ Publish version

[](#ez-publish-version)

- Make sure you use eZ Publish version 5.x (required) or higher.
- Designed and tested with eZ Publish Community Project GitHub Release tag (via composer) v2015.01.3

### PHP version

[](#php-version)

- Make sure you have PHP 5.x or higher.

Dependencies
============

[](#dependencies)

How to complete the following dependencies setup (if not already provided by your installation) is covered later in the README.md documentation

- This solution depends on eZ Publish Legacy's kernel class override feature is enabled in `config.php`. This documentation provides instructions how to setup this dependency in the **Installation &gt; Enable eZ Publish Kernel Overrides** section.
- This solution expects that your admin siteaccess settings are already configured to have more than one language in the `SiteLanguageList[]` settings array. This documentation provides instructions how to setup this dependency in the **Installation &gt; Configuration** section.
- This solution expects that your admin siteaccess settings are already configured to have the `TextTranslation=enabled` setting enabled. This documentation provides instructions how to setup this dependency in the **Installation &gt; Configuration** section.

Features
========

[](#features)

### Kernel class overrides

[](#kernel-class-overrides)

This solution overrides the following kernel classes:

- PHP Class : `ezpKernelWeb` - Found by default at: `kernel/private/classes/ezpkernelweb.php`
- PHP Function File : `global_functions.php` - Found by default at: `kernel/private/classes/global_functions.php`
- PHP Class : `eZNodeviewfunctions` - Found by default at: `kernel/classes/eznodeviewfunctions.php`
- PHP Class : `eZTemplateCacheFunction` - Found by default at: `lib/eztemplate/classes/eztemplatecachefunction.php`

**Note**: This solution requires only a few legacy kernel class overrides of classes that are very stable and not subject to much change (if at all) per release (which is important for maintainability). Our changes to these classes are very minimalistic, clearly documented and only when absolutely required to support the solution.

You can review our changes to the kernel classes by searching for our kernel class change documentation comments (in each modified file block of code), `// BEGIN BC : BCSwitchAdminLanguage : Kernel Hack` and ends with `// END BC : BCSwitchAdminLanguage : Kernel Hack`.

### Module View

[](#module-view)

This solution provides a module 'switchadminlanguage' view 'switch' which is used by the provided admin right side toolbar 'Switch Language' form.

The 'Switch Language' form provides a drop down menu displaying all the languages available to the current siteaccess and allows you to select a different language, click switch button.

Upon clicking the switch button a the form is submits a request to the switch module view, which sets a session variable containing the language locale identifier to switch the admin siteaccess language locale when the switch module redirects the user back to the previous page.

Installation
============

[](#installation)

### Extension Installation via Composer

[](#extension-installation-via-composer)

Run the following command from your project root to install the extension:

```
bash$ composer require brookinsconsulting/bcswitchadminlanguage dev-master;

```

### Extension Activation

[](#extension-activation)

Activate this extension by adding the following to your `settings/override/site.ini.append.php`:

```
[ExtensionSettings]
#
ActiveExtensions[]=bcswitchadminlanguage

```

### Enable eZ Publish Kernel Overrides

[](#enable-ez-publish-kernel-overrides)

Kernel class overrides are only able to be used if you add the following to your eZ Publish Legacy config.php configuration file.

```
cp -va config.php-RECOMMENDED config.php;

# Edit config.php to set 'EZP_AUTOLOAD_ALLOW_KERNEL_OVERRIDE' to true. It should look like this:
define( 'EZP_AUTOLOAD_ALLOW_KERNEL_OVERRIDE', true );

```

### Regenerate kernel class override autoloads

[](#regenerate-kernel-class-override-autoloads)

Regenerate kernel class override autoloads (Required).

```
php ./bin/php/ezpgenerateautoloads.php  --kernel-override;

```

### Extension Settings Override

[](#extension-settings-override)

Next you must create an extension settings override and customize the admin siteaccess name (Required).

```
cp -va extension/bcswitchadminlanguage/settings/bcswitchadminlanguage.ini.append.php settings/override/;

```

Edit `settings/override/bcswitchadminlanguage.ini.append.php` to set 'SharedAdminSiteaccessName' to your admin siteaccess name.

Here is an example of what it might look like in a default ezdemo based installation:

```
[BCSwitchAdminLanguageSettings]
SharedAdminSiteaccessName=ezdemo_site_admin

```

### Clear the caches

[](#clear-the-caches)

Clear eZ Publish Platform / eZ Publish Legacy caches (Required).

```
php ./bin/php/ezcache.php --clear-all;

```

Configuration
=============

[](#configuration)

### Siteaccess site.ini \[RegionalSettings\] SiteLanguageList\[\] Settings

[](#siteaccess-siteini-regionalsettings-sitelanguagelist-settings)

- Edit your `settings/siteaccess/(yourAdminSiteaccessName)/site.ini.append.php` settings file
- Add the languages you wish to be able to use to translation the siteaccess UI into by adding them to the `SiteLanguageList[]` settings array.

    - Here is a generic example of admin siteaccess settings which is configured to support translation from eng-US, fre-FR and ger-DE:

    \[RegionalSettings\] Locale=eng-US ContentObjectLocale=eng-US ShowUntranslatedObjects=enabled SiteLanguageList\[\]=eng-US SiteLanguageList\[\]=fre-FR SiteLanguageList\[\]=ger-DE TextTranslation=enabled
- If your not sure what language text strings are supported review the available default translations provide by default in the [share/translations](https://github.com/ezsystems/ezpublish-legacy/tree/master/share/translations) directory.

    - Note that the text strings representing the language name / identifiers expected in the `SiteLanguageList[]` settings array entries are the same as the `share/translations` sub directory names.
- Here is some related documentation on this [https://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Configuration-files/site.ini/RegionalSettings/SiteLanguageList](setting).

### Siteaccess site.ini \[RegionalSettings\] TextTranslation Setting

[](#siteaccess-siteini-regionalsettings-texttranslation-setting)

- Edit your `settings/siteaccess/(yourAdminSiteaccessName)/site.ini.append.php` settings file
- Check your default settings to ensure that the setting `[RegionalSettings] TextTranslation` is enabled. If it is not set or is disabled then you will need to change the setting to ensure it is specifically enabled within the siteaccess `site.ini.append.php` settings. Here is a abbreviated example:

    \[RegionalSettings\]

    This line of comment represents the other required but omitted settings normally found in this settings block but not specific to this example settings snippet
    ===============================================================================================================================================================

    [](#this-line-of-comment-represents-the-other-required-but-omitted-settings-normally-found-in-this-settings-block-but-not-specific-to-this-example-settings-snippet)

    TextTranslation=enabled
- The `TextTranslation=enabled` is required as it is the setting which enables template text string translation. Here is some related documentation on this [https://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Configuration-files/site.ini/RegionalSettings/TextTranslation](setting).

Usage
=====

[](#usage)

The solution is configured to work virtually by default once properly installed.

- First login to the admin siteaccess
- Then use the right side toolbar 'Switch Language' to select a different language.
- Then click 'Switch'
- Notice that the current (admin) siteaccess UI is now displayed using the previously selected language

**Note**: Changing the current language using this solution does not affect content object translation language in any way.

Troubleshooting
===============

[](#troubleshooting)

### Read the FAQ

[](#read-the-faq)

Some problems are more common than others. The most common ones are listed in the the [doc/FAQ.md](doc/FAQ.md)

### Support

[](#support)

If you have find any problems not handled by this document or the FAQ you can contact Brookins Consulting through the support system:

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/fda10bb840bcf345ab87d5ec5bd7c79da0be8858fc1b754db272ca1fc45e49e2?d=identicon)[brookinsconsulting](/maintainers/brookinsconsulting)

---

Top Contributors

[![brookinsconsulting](https://avatars.githubusercontent.com/u/617031?v=4)](https://github.com/brookinsconsulting "brookinsconsulting (3 commits)")

### Embed Badge

![Health badge](/badges/brookinsconsulting-bcswitchadminlanguage/health.svg)

```
[![Health](https://phpackages.com/badges/brookinsconsulting-bcswitchadminlanguage/health.svg)](https://phpackages.com/packages/brookinsconsulting-bcswitchadminlanguage)
```

###  Alternatives

[joedixon/laravel-translation

A tool for managing all of your Laravel translations

717911.4k11](/packages/joedixon-laravel-translation)[illuminate/translation

The Illuminate Translation package.

6936.4M495](/packages/illuminate-translation)[lajax/yii2-translate-manager

Translation management extension for Yii 2

227578.8k13](/packages/lajax-yii2-translate-manager)[larswiegers/laravel-translations-checker

Make sure your laravel translations are checked and are included in all languages.

256423.2k2](/packages/larswiegers-laravel-translations-checker)[inpsyde/multilingual-press

Simply THE multisite-based free open source plugin for your multilingual websites.

2414.0k1](/packages/inpsyde-multilingual-press)[statikbe/laravel-chained-translator

The Laravel Chained Translator can combine several translators that can override each others translations.

36149.4k6](/packages/statikbe-laravel-chained-translator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
