Viewing 7 replies - 1 through 7 (of 7 total)
  • Currently there’s now way of doing that out of the box! As long as a plugin package from www.remarpro.com contains your desired language file than it will be overridden on automatic plugin updates!

    Only, if a plugin supports alternate folders for hosting the translation files, for example in “/wp-content/languages/” (or in a subfolder named like the plugin there…), then you’re update secure.

    You can only do manual updates or just re-upload translations or beg the plugin’s author to integrate alternate translations locations.

    Maybe the whole process changes in the future as WordPress might go towards “language packs” — but no one of us knows yet how this will work in detail. Maybe, it will also be changed that plugin languages will be blocked from updates except for the admin of the site has this allowed or something like that. This option would be one of my faves ??

    This whole thing is definitely a field where WordPress could and REALLY SHOULD improve! Internationalization seems not on the focus of too much core devs…

    Hope this helps a bit, Dave ??

    Plugin Author codestyling

    (@codestyling)

    I’m currently working on a draft spec how to solve this backup issue. It’s not that easy to handle all for none programming related user.

    For plugin developers see this article on how to make language files in your plugin folder backup proof.

    Basically you add this to your functions.php:

    public function load_plugin_textdomain()
    {
        $domain = 'my-plugin';
        // The "plugin_locale" filter is also used in load_plugin_textdomain()
        $locale = apply_filters('plugin_locale', get_locale(), $domain);
    
        load_textdomain($domain, WP_LANG_DIR.'/my-plugin/'.$domain.'-'.$locale.'.mo');
        load_plugin_textdomain($domain, FALSE, dirname(plugin_basename(__FILE__)).'/languages/');
    }

    This way your plugin will look for a language file in WP_LANG_DIR.'/my-plugin/ first before checking the ‘local’ language folder.

    Plugin Author codestyling

    (@codestyling)

    The rewritten version 2.0 of CodeStyling Localization will contain 2 essential new things:

    1. Backup/Restore of Translation Files
    2. Maintainance of Translation files by re-routed folder to provide an overwrite safe way

    The 2nd point will also permit synchronizations as you want it and is also included within the full backup system.

    Sounds amazing, when is it up for grabs?

    I couldn’t find a repository for your plugin, is it available somewhere? Would be nice to develop it with you :-)!

    Plugin Author codestyling

    (@codestyling)

    The new one plugin (2.0) only exists at my local development system.
    If all went the right way, it will be released at 01.01.2013 but will also have proconditions:
    – will not run with WordPress less than 3.4
    – will not run with PHP less than 5.1
    There is no longer backward compatibility, so the 1.x Versions will get frozen at this time an only get patches for a short time period.

    Thread Starter Juanzo

    (@jmzolezzi)

    That’s great news!

    And I agree on focusing on new versions only and updated PHP installations.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Codestyling Localization] Keep translations after plugin update’ is closed to new replies.