Add Locale Class

Add Locale Class

from 0$

Add Locale Class is a Package Installer from the Open Source WP Plugins range Render CSS According to a Site's Current Language

For more information about a tailored Package Installer like Add Locale Class please contact us directly.

On multi language sites there may be occasions when you want to render CSS according to the current language in use. The Add Local Class plugin solves this problem by adding the current language code as a class in the body tag on both front end and admin pages.

For example, if you set the language of the site to French, then the language code used is fr_FR. Add Local Class will retrieve the language code format it as ‘locale-fr-fr’ and add it to the body tags on the front end of the site. It will also retrieve the language code of the backend user and set it as a body tag class on the back end of the site. Should the site’s language be changed to U.S. English, then the class would be changed to ‘locale-en-us’.

In your CSS file you can have one rule for French and another for English:

. locale-fr-fr .button {
background-color: blue;
}

. locale-en-us .button {
background-color: red;
}

With the Add Local Class plugin it possible to make use of language specific CSS on your site.

This plugin does not have a settings page. You simple install and activate it.

The Add Local Class plugin is brought to you by Max Foundry. We make a WordPress Gallery plugin, a plugin for WordPress media library folders and MaxButtons.

Download & install the zip archive

The plugin package installer can be downloaded from the WP2E project tab called “code”.

1 – Select the version to download if this option is available otherwise the “latest” version of the main plugin will be used.

2 – After downloading the zip archive install the plugin package installer in you local environment and activate the script from the plugin list.

3 – Under the section “Plugins” of the admin dashboard you should see a new “Dependencies & Licenses” link. Follow the instructions from this panel to finalize the installation of the missing dependencies.

Tips: Use the WP2E panel to add/suggest new dependencies to the local installation. Press F5 in the list of dependencies if the changes are not displayed right away.

Add Locale Class

typePlugin
versionlatest
descriptionRender CSS According to a Site's Current Language