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:
Search in the Choose Condition drop-down, and select Dynamic Data:
Then, choose PHP Function Return Value:
Set the Function Name equal to
get_locale and then click Insert:
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):
If you want to target another language, you can just repeat the same process to add another condition.
Also, if needed, rules to exclude entire pieces of content from translation can be used.