Documentation > Restrict by language > Oxygen Builder Integration

Oxygen Builder Integration

Browse Docs
Search Documentation

TranslatePress is also compatible with Oxygen Builder, that’s why if your website is built on Oxygen, you can display certain elements in specific languages directly from Oxygen’s interface.

How to Show/Hide Oxygen Builder Elements Based on Language

Go to the Oxygen editor interface and open the element you want to restrict based on a language. Then, click the Condition Settings icon and then Set Conditions:

Search in the Choose Condition drop-down, and select Dynamic Data:

Oxygen Restrict by Language - Choose Dynamic Data

Then, choose PHP Function Return Value:

Oxygen Restrict by Language - Choose PHP Function

Set the Function Name equal to get_locale and then click Insert:

Oxygen Restrict by Language - Enter get_locale PHP function

Set the value equal to the language code for the language that you want to target (this code is available by going to Settings → TranslatePress and looking in the Code column of the All Languages section):

Oxygen Restrict by Language - Enter the Language Code

If you want to target another language, you can just repeat the same process to add another condition.

Oxygen Restrict by Language - Set Another Language Code

Apart from showing or hiding Oxygen Builder elements based on language using the TranslatePress integration, if needed, rules to exclude entire pieces of content from translation can also be used.

TranslatePress Multilingual

The best website localization service for WordPress websites. Manage everything from a visual interface.