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.
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
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ā¦
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?
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.
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
@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.
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!
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.
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:
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.
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.
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: