Codestyling Localization
[resolved] Cannot translate to danish (2 posts)

  1. nurabillie
    Posted 3 years ago #


    I have a problem using Codestyling localization to translate WooCommerce Subscriptions. My danish translation will not show up on my website. I already translated everything, generated the .mo file and rescanned. I've also changed the wp config to my language. Nothing works! Do I have to change something in the editor for the translation to show up on my site?

    * Called on plugins_loaded to load any translation files.
    * @since 1.1
    public static function load_plugin_textdomain(){

    $plugin_rel_path = apply_filters( 'woocommerce_subscriptions_translation_file_rel_path', dirname( plugin_basename( __FILE__ ) ) );

    load_plugin_textdomain( self::$text_domain, false, $plugin_rel_path );


  2. codestyling
    Plugin Author

    Posted 3 years ago #

    The problem can't be solved within my plugins, because it has no knowledge about the place, where the translation file will be loaded from.
    The path will be generated by filter so the system can't correctly identify it.
    Forthermore the plugin uses the same naming convertion for a method at a class, that also exists as global function. So the scanner can't locate the textdomain nor the right place of translation file.
    In this cases it defaults to plugin slug as base for translation file and normally to one of the folders from plugin to be choosen.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic