Skip to:
Content
Pages
Categories
Search
Top
Bottom

Function addition for translation

  • Avatar of lenasterg
    lenasterg
    Participant

    @lenasterg

    Hi.
    I added a function in order to use it with Greek language.
    Below is the function.

    `
    function bp_groups_edit_slug_locale_init () {
    $plugin_dir = basename(dirname(__FILE__));
    $locale = get_locale();
    $mofile = WP_PLUGIN_DIR . “/bp-edit-group-slug/languages/bp-edit-group-slug-$locale.mo”;

    if ( file_exists( $mofile ) )
    load_textdomain( ‘bp-edit-group-slug’, $mofile );
    }
    add_action (‘plugins_loaded’, ‘bp_groups_edit_slug_locale_init’);

    `

You must be logged in to reply to this topic.