How to use it
An element in one language only
- Select the element and open its Conditions.
- Add the condition Language from the Kiln group.
- Choose is or is not, then the language.
A header, footer or theme style per language
- Open the template's settings (or the theme style's Conditions).
- Add a condition and choose Language (Kiln).
- Pick one or more languages.
How Bricks combines conditions
Bricks scores every condition row of a template on its own and uses the highest score. Rows are combined with OR, so "Post type: Post" plus "Language: German" on one template means "any post, or anything in German", not "German posts". Make one template per language instead.
A language row scores 5. That beats "Entire website" (2), "All archives" (3) and "All terms" (4), and loses to a post-type condition (7) or a specific page (8 to 10).
Theme styles load one at a time by default: on a German page, a German-only theme style replaces your site-wide style completely, not just the settings it changes. Either copy the site-wide settings into it, or set Bricks > Settings > General > Theme styles: Loading method to Load all matching theme styles, so the German style only adds to the site-wide one.
Limits
- Exclude is hidden on language rows: Bricks only lets its own conditions exclude.
- On the front end, the condition uses the page's language. When WPML shows an English post at a German URL ("display as translated"), the German header and style apply.
- Polylang is tested. WPML support follows WPML's documented API and has not been tested on a live WPML site yet.
Settings
None. The module is on by default when Polylang or WPML is active.
Requirements
Bricks 2.4 or newer, and Polylang or WPML.