• Resolved sarjona

    (@sarjona)


    Hi!
    We’re trying to upgrade from 2.X version to 3.1.1 and we’ve found a problem with localization: some of the strings (like “All Calendars” in the Dashboard menu) are not traslated correctly because load_plugin_textdomain is called after. At the moment we’ve fixed this bug adding the following code to includes/main.php file:

    public function __construct() {
    
    		// Set up localization.
    		load_plugin_textdomain( 'google-calendar-events', false, dirname( plugin_basename( SIMPLE_CALENDAR_MAIN_FILE ) ) . '/i18n/' );
    		// Load plugin.
    		require_once 'autoload.php';

    Could you move this code from init function to __construct function to make sure localization files are loaded always? ??

    Kind regards from Barcelona
    Sara

    https://www.ads-software.com/plugins/google-calendar-events/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Localization is not working for all strings’ is closed to new replies.