12% off of LTD using this coupon: TWELVEPERCENTOFF. Promo ends on 2 Dec midnight UTC.
Published on Jun 16, 2022

[Condition] Browser Language

Sridhar Katakam

This members-only tutorial provides the code for registering a custom condition using which elements in Oxygen can be set to be output if the visitor's browser language matches the specified string in the condition.

We shall make == and contains operators be available.

== is for exact match incl. the region code. This is case-sensitive.

contains is for loose match i.e., just the language without the region.

Step 1

Create a new snippet in your favorite code snippets plugin (mine is WPCodeBox).

Title: Browser Language


This is a premium members-only content.

To view the rest of the content, please sign up for membership ($47/month or $599 one-time).

Already a member? Log in below or here.