SOLVED: Problem with builder language settings

After updating to 1.9.1 builder is translated to the preferred language (in my case Serbian). Since the translation is not quite correct I tried to set English back, but with no success. As you can see in the image below Iā€™ve set English, but everything is still in Serbian.

Any idea how to fix this?

Best regards,
Goran

1 Like

Hi @tole011,

That setting controls the language of the Bricks builder itself (when editing a page, templateā€¦ etc.). To change your WordPress admin area language youā€™ll have to do so from your profile settings: How to Change the WordPress Dashboard Language for a User.

But let me know if the builder itself is still not in English when youā€™re editing a page :slight_smile:

Thanks @charaf ,
I know that. I was surprised to see Bricks admin pages in Serbian because until 1.9.1 it was in English.
I guess I have to live with couple irritating translationsā€¦ :wink:

Best regards,
Goran

1 Like

I have the same problem and I think it IS a bug. It shouldnā€™t work this way.

  • My site language is Czech
  • My user language is English
  • My builder language is English

BUT - everything in Bricks builder itself is in Czech and, unfortunately, the translation is unusable.

Here is the image of the dashboard. Everything in the red boxes is in Czech, while it should be in English. The same goes with the names of all the elements and controls right in the builder.

Both @tole011 and I are talking about the language of the Builder, not the language of the content or the language of the user. What else would be the Bricks setting for and why are you suggesting we should change our dashboard/user language?

Everything was OK before 1.9.1

@charaf, could you please look into it again?

Thanks

UPDATE!

In other thread @Niko_S mentioned, that for him the problem was caused by the plugin ā€œSmash Balloon Custom Facebook Feed Proā€. Iā€™ve realized, that this is my case as well. If I deactivate the plugin, everything is ok.

Iā€™m not sure wheather the problem is caused just by the other plugin, or it is just a hint, whatā€™s the problem in Bricks. It should be mentioned, that other parts of the dashboard are ok, the translation problem is there only in Bricks.

And since Iā€™ve installed the Smash Ballon plugin the same day as I updated Bricks to 1.9.1.1, I cannot tell wheather the problem was there before or not.

1 Like

Hi @Blackeye,

Yes, if the Bricks builder language is configured to ā€œEnglish,ā€ yet the builder is still displayed in a different language, then that would indeed be a bug. This setting is intended to change the builderā€™s language, which is why I recommended modifying the user profileā€™s language. Doing this will also adjust the WordPress dashboard language to avoid any confusion :slight_smile:

@Blackeye & @tole011 Please let me know if disabling ā€œSmash Balloon Custom Facebook Feed Proā€ results in the correct language showing up in the builder. Because when I try replicating the setup locally without that plugin, the builder renders in English.

Hi @charaf,

I can confirm, the problem is there only when Custom Facebook Feed Pro Personal is activated.

Moreover, the free version of this plugin (Smash Balloon Social Post Feed), doesnā€™t have his effect.

Surely thereā€™s something in their Pro plugin, thatā€™s conflicting with Bricksā€™s translations.

Iā€™ve sent them a bug report, but no reply so far.

1 Like

The same thing happens when I activate the SEO Press Pro plugin. (not the free version, only the paid.) Same case as described above.

Same problem with Yoast Seo v.22.9
Iā€™m using Bricks 1.9.9.
Only by disabling the plugin, it works in the standard languageā€¦ Not my prefered plugin, but since very very popular I think it deserves that Bricks Team has a deeper look into thisā€¦ Have a nice day!

1 Like

Hi @Hein & @MikeMr ,
Would you be so kind as to send temporary login credentials and a link to this thread to help@bricksbuilder.io using the email address you used during the purchase?

We currently donā€™t have an SEO Press pro license, and unfortunately, I canā€™t reproduce it with Yoast (free) either, so access data would be great to track this issue down.

Hi, looks like I have the same problem, if SEO Press is enabled, free version even the language changed to the langauge assigned and is not english.

Hi @teddypetcu ,
As far as I can see, Hein and MikeMr have not yet sent us any access data. Would you be willing to send us some?

Hi @timmse, I have sent you the login details yesterday. Any chance to look into the issue? Thanks.

Thank you. We have received your email and will reply as soon as possible. Please leave the installation until then.

Hi @teddypetcu,

The issue on your site seems to be stemming from the WPML String Translation plugin. Specifically, the function in classes > MO > Hooks > LanguageSwitch.php in the plugin is causing it:

public function initCurrentLocale() {
	if ( ! $this->getCurrentLocale() ) {
		add_filter( 'locale', [ $this, 'filterLocale' ], PHP_INT_MAX );
		$this->setCurrentLocale( $this->language_resolution->getCurrentLocale() );
	}
}

Since the locale hook priority is set to PHP_INT_MAX, Bricks cannot override it effectively. Bricks sets the locale in the builder in includes > builder.php with a lower priority:

add_filter( 'locale', [ $this, 'maybe_set_locale' ], 99999, 1 );

Weā€™ll share this with the WPML team to see what can be done. In the meantime, we will keep the current forum thread as ā€œWAITā€, as the original report and other reports in the thread do not seem to be related to WPML.

1 Like

hopefully it will be possible soon to set a builder language. its really complex to handle atm.

I have no issues with WPML directly. The builder/user language settings donā€™t apply until Yoast (free) is disabled, regardless of the WPML SEO addon.

Even though the ā€˜localeā€™ filter is high priority, adding the same filter to a theme with the same priority runs it after WPML.

I added a filter in my themeā€™s functions file to check if the editor is active. If so, it checks for the current usersā€™ selected language, or defaults to English:

/**
 *  Modify Bricks locale.
 */
add_filter( 'locale', function( $locale ) {

	if ( function_exists( 'bricks_is_builder' ) && bricks_is_builder() ) {
		// Get the current users locale.
		$user_locale = get_user_meta( get_current_user_id(), 'locale', true );
		// Return the user locale or fall back to english.
		return $user_locale ? $user_locale : 'en';
	}

	return $locale;

}, PHP_INT_MAX );

UPDATE: Iā€™m new to Bricks and was thinking in terms of page builder plugins. It can be fixed by modifying the priority in the parent theme, which also checks the builder setting before any user settings.

// includes/builder.php line 21
add_filter( 'locale', [ $this, 'maybe_set_locale' ], PHP_INT_MAX, 1 ); // Hook in after TranslatePress

If I make that change and remove the filter from my child theme then the builder language is respected and can be overridden by changing language preference in profile settings.
It messes with the language switcher, so may potentially have some unforeseen consequences.

Hi @robwent,

Welcome to the forum :slight_smile:

Can you try replacing ā€˜localeā€™ with ā€˜determine_localeā€™ in includes > builder.php on line 21? We encountered a similar issue with WPML, and making this change seemed to resolve it:

add_filter( 'determine_locale', [ $this, 'maybe_set_locale' ], 99999, 1 );

Let me know if this helps! It should be included in the next release.

Hi @charaf

Yep, that also works!

1 Like

Hi guys,

Weā€™ve fixed this issue in Bricks 1.11 BETA, now available as a manual download (Bricks ā€“ Account)

Please let us know if you are still experiencing issues.

You can see the full changelog here: Bricks 1.11 Changelog ā€“ Bricks

As with any beta release, please do not use it on a production/live website. It is only meant for testing in a local or staging environment.

Best regards,
Matej