A plugin to set a category’s locale based off it’s slug.
This plugin allows you to set the locale for individual categories by basing the category slug off the locale’s language code. For example, for Persian set the category’s slug to
fa-ir. The locale will be applied to the category and to its subcategories.
When the locale changes, the new locale is automatically reloaded. For non-locale categories, the locale is reset to either the site’s default locale, or the user’s preferred locale.
Todo: get the locale off the http headers for non-logged in users.
The plugin works, but is still under development. If you are interested in using it on a ‘serious’ website, get in touch with me.
The categories page is displayed in either the site’s default locale or the user’s preferred locale:
The category page for localized categories uses the category’s locale:
This is shown when the locale is being updated. The text should probably be replaced with some kind of graphic: