Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Translation doesnt work

Viewing 5 replies - 1 through 5 (of 5 total)
  • Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    Hi @makoun

    How are you loading the .mo file?

    Profile photo of makoun
    makoun
    Participant

    @makoun

    Well here https://codex.buddypress.org/translations/ it says eveyrthing should happen automatically. And on codex it doesn’t say anything about how to load the file. So I need to load it somehow still? :)

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    i downloaded finnish translations, renamed to buddypress-fi_FI.po and buddypress-fi_FI.mo

    Can you explain where you get the translation and why you renamed the files, because normally a translation is already named correctly and has the right extension.

    If you rename a xxx.pot file to xxx.po there is no particular problem because it is a simple text file.
    If you rename xxx.pot to xxx.mo, you get a big problem ! As the mo file is a compiled format. All this is explained on the “not outdated” codex page.

    buddypress-fi_FI.mo/po goes into wp-content/languages/plugins/

    Aside, if you find outdated stuff on the codex, you can edit it and publish a new version or report it on Trac or on this forum. Codex is a community tool made by and for the community. And not only for passive or grumpy readers. 😉

    BP translations are on Glotpress, since BP 1.9:
    https://translate.wordpress.org/projects/buddypress/2.0.x/fi/default

    Profile photo of Henry Wright
    Henry Wright
    Moderator

    @henrywright

    Yeah, you should definitely make WordPress aware of it. Try doing the following in your theme’s functions.php file:

    if ( file_exists( WP_LANG_DIR . '/buddypress-fi_FI.mo' ) ) {
        load_textdomain( 'buddypress', WP_LANG_DIR . '/buddypress-fi_FI.mo' );
    }

    Note: This assumes your file is located at wp-content/languages/buddypress-fi_FI.mo

    Profile photo of makoun
    makoun
    Participant

    @makoun

    Cheers, that did the trick!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Translation doesnt work’ is closed to new replies.
Skip to toolbar