Disable Translatepress in Oxygen Builder

ARTRU
Disable Translatepress in Oxygen Builder

Translatepress is a multilingual plugin with automatic translation function. It will translate as String rather than creating new language fields like Polylang.

Also because it translates to String, the problem occurs when the default language is not English. If you turn on Translatepress's automatic translation feature, the elements in Oxygen Builder will also be translated according to the default language you have installed.

This makes editing difficult, because I'm used to Oxygen's English interface.

As in my case the customizations in Oxygen Builder were translated into Vietnamese language. I don't want this at all because it doesn't translate properly, and it's also difficult when you want to find fault with something, but it's no longer the default language of Oxygen Builder.

Translatepress translates elements in Oxygen Builder
Translatepress translates elements in Oxygen Builder

To fix this problem, disable Translatepress in Oxygen Builder.

You can do it in 2 ways below.

Use the FDP plugin included with the add-on

Install these 2 plugins:

  • Freesoul Deactivate Plugins
  • Editor Cleanup For Oxygen: FDP add-on to cleanup the Oxygen editor
Freesoul Deactivate Plugins
Freesoul Deactivate Plugins
Plugin Editor Cleanup For Oxygen
Plugin Editor Cleanup For Oxygen

From the interface Admin Oxygen Editor Cleanup.

Editor Cleanup Oxygen
Editor Cleanup Oxygen

Select the area to disable the Translatepress plugin in Oxygen Builder.

Select the area to disable the plugin in Oxygen Builder
Select the area to disable the plugin in Oxygen Builder

Uncheck the box Translatepress plugin to disable and click Save all Changes.

Disable translatepress with FDP plugin
Disable translatepress with FDP plugin

Using code in function.php

Write this code in file function.php:

add_filter('option_active_plugins', function ($plugins) {
	if (strpos($_SERVER['REQUEST_URI'], 'ct_builder=true') !== false) {
		$key = array_search('translatepress-multilingual/index.php', $plugins);
		if (false !== $key) {
			unset($plugins[$key]);
		}
	}
	return $plugins;
});

The code above has the function to deactivate the Translatepress plugin when the URL contains ct_builder=true.

Also enable option AdvancedDebugDisable translation for gettext strings

Disable translation for gettext strings
Disable translation for gettext strings
COMMENT

Related Articles