How can we help?

Changing language issue

When we change the language of the site while trying to add an event to our website, a 404 error message appears. However, this issue is now fixed with a simple code that needs to be pasted in the function.php. Now the error message does not appear while adding an event after changing the language. Or you can create a child theme and paste the code in the child theme’s function.php

Here is the code

add_action('init', function() {
    if (is_admin()) {
        return;
    }

    $current_locale = get_locale();
    $flushed_locale = get_option('last_flushed_locale');

    if ($current_locale !== $flushed_locale) {
        flush_rewrite_rules(false);
        update_option('last_flushed_locale', $current_locale);
    }
});
Changing Language Issue
Editorial Team

Our team constantly explores ways that technology can help us reinvent industries. We want to change the world by creating great products that transform industries. We Dream It, We Make It.

Quick Links
Close
Close