Skip to:
Content
Pages
Categories
Search
Top
Bottom

bbPress Language Files


  • migueltavares
    Member

    @migueltavares

    I have download the correct .MO and .PO files for Portuguese Language, but I can’t figure out how to get it working!

    Where should the files be uploaded to?

    Any help?

Viewing 25 replies - 1 through 25 (of 39 total)
  • Hi.

    Add this to your functions.php file in you theme.

    add_action(‘after_setup_theme’, ‘my_theme_setup’);

    function my_theme_setup(){

    load_theme_textdomain(‘bbpress’, get_template_directory() . ‘/languages’);

    }

    Then place your language files ind the at folder in your theme folder.

    Vayu


    amirsaam
    Member

    @7i7griffin

    Nope @Vayu. He mean bbPress language not theme or plugin.

    Language files must upload in a directory in bbPress root called my-languages

    (Also you must look at the post date: 1 month ago!)

    Hi

    I am not sure your right about this. In the index.php file in bbpress/bbp-languages/index.php it says the following.

    “Do not put custom translations here. They will be deleted on bbPress updates.

    Keep custom bbPress translations in /wp-content/languages/”

    I first tried to place my language files in bbp-languages folder and it did’t work.

    When you do as I explained both the theme and bbpress will be translated. That’s what you want isn’t it?

    I did notice the date of the post, but people might find my answer helpful even if migueltavares is not looking for help on this anymore.

    Vayu


    amirsaam
    Member

    @7i7griffin

    Dude you mean bbPlugin or bbPress (StandAlone vr.)?

    For the StandAlone one you must put your language files into my-languages and for bbPlugin put them into WordPress language directory with name like bbpress-fa_IR.po or .mo. themes and plugins have a directory for translations, if have not code a textdomain for it :)

    I mean bbPress plugin.

    http://wordpress.org/extend/plugins/bbpress/

    Cheers

    Vayu

    I would like to know how this is done, BBpress 2.0. I have uploaded the .mo and .po files all over the place :-) Only thing I have not done is what Vayu said:

    add_action(‘after_setup_theme’, ‘my_theme_setup’);

    function my_theme_setup(){

    load_theme_textdomain(‘bbpress’, get_template_directory() . ‘/languages’);

    }

    Do I have to do that ?

    TIA

    Moddey

    Hi Moddey.

    I am not sure if what I did is correct. I can’t seem to do this in all my themes. And I can’t seem to find out why.

    I am also interested in finding a solution that actually works. :-)

    Hi Vaju,

    I have now searched the internet (yes all of it I think) and it seems there is a lot of confusion about bbpress and how to change languages.

    Has anyone got this to work in version 2.0 (Plugin) ?

    Here is what I have tried so far :

    1: mo and po files uploaded to /wp-content/plugins/bbpress/bbp-languages

    2: Looked in and edited a lot of php files.

    3. Checked nearly every file in my themes folder (Suffusion).

    4. Have been in discussion with Suffusion theme forum.

    None of the above has helped in any way :-(

    My wordpress is showing the correct language, which is great. A major problem is the Forum is not. I currently have the site offline for now. But it should be up again before the start of next week (well thats what I have told the users) :-)


    highexistence
    Participant

    @highexistence

    Same problem, I’m using the BBpress 2.0 plugin with WordPress and cannot get the BB language file to be implemented.

    I used define(‘BBLANG’, ‘hethen’); in wp-config and also placed the .mo file in wp-content/languages and in bbpress/bbp-languages/


    amirsaam
    Member

    @7i7griffin

    I do not think you’re do the right thing guys. I think you jus’ must put the language file into WP language directory (wp-content/languages) with a name like (I’m not sure about it) bbp-fa_IR.po or bbppress-fa_IR.po and/or mo. That fa-IR is for my language, example for english: en_US


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Having language files for bbPress 2.0 isn’t enough. The proper translation files need to exist for WordPress also.


    highexistence
    Participant

    @highexistence

    @johnjamesjacoby — could you give more specific instructions on how to do this?

    I’ve tried all combinations of file placement and am using this:

    define(‘WPLANG’, ‘en_US’);

    define(‘BBLANG’, ‘en_US’);


    amirsaam
    Member

    @7i7griffin

    LOL! Yep @JJJ is right! On line 538 of bbPress.php we have a language directory for bbPress! It exist like /wp-content/languages/bbpress/ and I think the textdomain (if need but I don’t think so) is bbpress

    That was what I got from that file :)


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    @highexistnence – What version of bbPress are you using? If using 2.0, put your WordPress translation files in:

    /wp-content/languages/

    your bbPress translation files in:

    /wp-content/languages/bbpress/

    and then:

    define('WPLANG', 'es_ES');

    in your wp-config.php, replacing es_ES with your language code.

    If you’re language is English, then you don’t need to do anything.

    Thanks John, but I am still not getting any translation on the bbPress forum plugin.

    I have my WordPress translation files here: /wp-content/languages/ and my WP installation is translated perfectly.

    I have placed my bbPress plugin language files here:

    /wp-content/languages/bbpress/da_DK.mo

    /wp-content/languages/bbpress/da_DK.po

    I have this in my wp-config.php:

    define(‘WPLANG’, ‘da_DK’);

    I have downloaded the language file from Glotpress.

    http://translate.wordpress.org/projects/bbpress/plugin/da/default

    Wonder what can be going wrong??

    Thanks

    Vayu

    Hi a

    Same as Vayu here, except I have not downloaded the language file from Glotpress, I am using the last version.

    Other than that everything else is exactly the same.

    Moddey

    Hi Moddey.

    To download your language file from glotpress

    http://translate.wordpress.org/projects/bbpress/plugin

    You have to be logged in.

    Click into your language section. At the bottom of the page you can export the language file.

    Hi Vayu, Thanks I found it, I did not see the “export” tab the first time I was there :-)

    Takker

    Moddey

    Also looking for the solution, I resorted to reading the code and found it. Quick version: bbPress inherits WordPress’ locale string. Suppose it’s ‘it_IT’. Then you will have to put your language file in wp-content/languages/bbpress/bbpress-it_IT.mo ;-)

    In-depth version: in bbpress.php you can find the load_textdomain() function (line 524 ATM). There you can see it gets the WordPress locale, then uses it to compose the language filename in the $mofile variable. $mofile in our example case is set to ‘bbpress-it_IT.mo’, and this filename is looked for in the ‘wp-content/plugins/bbpress/bbp-languages’ directory first (which, as index.php says, should not be used), and then in the ‘wp-content/languages/bbpress/’ directory. Just put it there named like we found before and you’re done.

    Thanks Bardo for the info, but still no joy here :-(

    I have in

    /wp-content/languages/bbpress both bbpress-da_DK.mo and bbpress-da_DK.po.

    I also put them in /wp-content/plugins/bbpress/bbp-languages and I removed the bbpress.pot file from that dir just to see what would happen.

    I even edited some Danish into bbpress.pot just to see would that help. But alas still no local language :-(

    Do you mean that $mofile should be actually set to bbpress-dk_dk.mo ? or should it just be bbpress-%s.mo.

    Moddey

    Hi Bardo, thanks for helping.

    This worked for me finally. :-)

    So I have these 2 files here like this:

    /wp-content/languages/bbpress/bbpress-da_DK.mo

    /wp-content/languages/bbpress/bbpress-da_DK.po

    Nothing else.

    Vayu

    @Vayu: happy it worked :)

    @Moddey: your first try should have worked (look at Vayu’s solution). It’s normal that nothing changes if you edit the pot file: pot files are like “translation sources”, po files are the translated version in a human readable form, mo files are their machine-readable form. So tou should need only bbpress-da_DK.mo in your /wp-content/languages/bbpress/ directory.

    Are you sure the file permissions are ok and the web server can read them?


    iyem Polat
    Participant

    @iyem-polat

    @bardo

    hi brother,

    I created in /wp-content/languages/ a bbpress directory (/wp-content/languages/bbpress) and I updated bbpress-tr_TR.mo and bbpress-tr.po files to this directory and than I updated the mo and po /wp-content/plugins/bbpress/bbp-languages

    I changed bbpress.php load_textdomain() function (line 524 ATM).

    public function load_textdomain() {

    // Allow locale to be filtered

    $locale = apply_filters( ‘bbpress_locale’, get_locale() );

    // Get mo file name

    $mofile = sprintf( ‘bbpress-tr_TR.mo’, $locale );

    // Setup paths to current locale file

    $mofile_local = $this->lang_dir . ‘/’ . $mofile;

    $mofile_global = WP_LANG_DIR . ‘/bbpress/’ . $mofile;

    // Look in local /wp-content/plugins/bbpress/bbp-languages/ folder

    if ( file_exists( $mofile_local ) )

    return load_textdomain( ‘bbpress-tr_TR.po’, $mofile_local );

    // Look in global /wp-content/languages/ folder

    elseif ( file_exists( $mofile_global ) )

    return load_textdomain( ‘bbpress-tr_TR.po’, $mofile_global );

    // Nothing found

    return false;

    }

    I use bbpress plugin 2.0.1

    My WP version is 3.2.1

    %100 I did somethinh wrong because my english is not very good.

    What can be going wrong?

    Thank you.

    does bbpress have support for Hindi language?

    After having read this thread and I sit with the same problem. Then it would probably be appropriate to maybe get to a function so you can thru the admin panel choose which language you wish. Yes, and that all language files included with the package when installing bbPress.

    Or one might even in the admin panel to add a “upload” of language files so they end up where they should and is automatically activated .. yes I’ve seen it in Joomla but there is something quite different but the principle

    BR

Viewing 25 replies - 1 through 25 (of 39 total)

You must be logged in to reply to this topic.