Skip to:
Content
Pages
Categories
Search
Top
Bottom

Couldn't get Locale filter to work


  • Ashfame
    Participant

    @ashfame

    Don’t know what seems to be the problem.

    I am trying to have a non-english language on the front side by keeping the admin panel in English only.

    I defined the BB_LANG in config file and now I can’t get the filter to work.

    add_filter('locale', 'bb_language_switcher_filter');

    function bb_language_switcher_filter( $locale )
    {
    if ( bb_is_admin() )
    $locale = 'en_US';
    return $locale;
    }

    Even this doesn’t work

    add_filter('locale', 'bb_language_switcher_filter');

    function bb_language_switcher_filter( $locale )
    {
    $locale = 'en_US';
    return $locale;
    }

    So I guess I am doing something wrong here.

    The filter is in bb_get_locale() located at line 41 in bb-includes/functions.bb-l10n.php

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.