Oxygen Builder Integration

TransatePress 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 the Oxygen’s interface.

How to Show / Hide Oxygen Builder Elements Based on Language

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

Set condition

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

Choose dynamic data

Then, choose PHP Function Return Value:

Choose PHP function

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

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):

Set language code

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

Set language code

Also, if needed, rules to exclude entire pieces of content from translation can be used.