Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Change GP and GB language independently of the WP language?

  • Hey there,

    in my German WP environment, the language has also changed to German at some point in the last few weeks.
    This is not ideal, as many of the options that are set worldwide are in English by default – e.g. those that come from CSS.
    I would like to have my GP and GB in English again.
    But my WordPress should remain in German, as my customer also speaks German – of course.

    Is that possible?

  • Hi there,

    if your site was displaying the GP and GB UIs in English – what changed on the site to cause them to show in German ?

  • this happened automatically on all my GP websites a few weeks ago.
    I just update my WordPress translations regularly – could this have something to do with it? It must be, as this is the only place where I update anything with translations. 🤷🏻‍♂️

  • Could be. I am gonna refer this to Tom, as he’s more of an expert on this 🙂

  • Try this PHP Snippet:

    
    add_filter( 'gettext', function( $translation, $text, $domain ) {
        $skip = [
            'generateblocks',
            'generatepress',
        ];
    
        if ( ! in_array( $domain, $skip ) ) {
            return $translation;
        }
    
        return $text;
    }, 10, 3 );
    
    
  • Hey David,

    did not work unfortunately … i have no idea why.
    Maybe you ca a) add a Language-Button in the future or b) skip all coding related words from the translationfile …

    all the best
    Matthias

  • Hey Matthias,

    I think we’re going to want to remove translatable functions from all CSS properties, as I agree that those should likely remain in English.

    Chances are the function above doesn’t work as those translations (in the editor) are in JS, so the gettext filter won’t work. I don’t believe there’s an alternative in JS, unfortunately.

    I’ll raise this issue with the team to see if we all agree that these strings should remain in English.

    Thanks!

  • Hey Tom,

    that would be great – even for people with no coding background, cause if they google something like setting the background image size for example – they will also only find the property names in english like “contain” or “cover” and so on …

    All the best
    Matthias

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.