Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to start doing a translation

  • Avatar of Aran
    aran
    Participant

    @aran

    Sorry, bit of a newbie question here!

    I’d like to localise BP for Welsh.

    What is the best way to get stuck in? Is there a single file I can work on?

    Thanks very much for your help…:-)

Viewing 9 replies - 1 through 9 (of 9 total)
  • Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    Avatar of Aran
    aran
    Participant

    @aran

    Thanks very much for that, Jeff…:-)

    So if I add a translation to the .pot file at bp-languages/buddypress.pot, what else needs to be done to make the language switch?

    Avatar of Xevo
    Xevo
    Participant

    @xevo

    1. Download poEdit.

    2. Install poEdit.

    3. Get .pot file from buddypress.

    4. Load .pot file into poEdit.

    5. Start translating.

    6. When finished, save and the .po and .mo file gets made automatically.

    If I remember correctly, thats the way to go.

    Avatar of stwc
    stwc
    Participant

    @stwc

    You also have to edit/create a /plugins/bp-custom.php and add the bplang definition.

    define( ‘BPLANG’, ‘yourlanguagename’ );
    if ( file_exists( BP_PLUGIN_DIR . ‘/bp-languages/buddypress-‘ . BPLANG . ‘.mo’ ) ) {
    load_textdomain( ‘buddypress’, BP_PLUGIN_DIR . ‘/bp-languages/buddypress-‘ . BPLANG . ‘.mo’ );
    }

    Avatar of Aran
    aran
    Participant

    @aran

    Thanks very much for that, stwc, much appreciated…:-)

    I’m still not entirely clear where the .mo file needs to go – just in where the buddypress.pot file is now, or do I need to create a new directory somewhere?

    Avatar of stwc
    stwc
    Participant

    @stwc

    You can just keep the .po and the .mo where the Buddypress one is (as in the code snippet above). Name them something appropriate.

    Edit: Actually, I don’t know if that’s wise or not. Best wait for second opinion on location.

    Avatar of Aran
    aran
    Participant

    @aran

    I’ll take that as a working theory and give it a whirl, and then see if there are any second opions on offer at any stage…:-)

    Thanks a lot for your input, stwc and Xevo and Jeff…:-)

    @stwc
    I’m trying the same route….I am following Xevo instructions. After that I do need to follow your BLANG instructions?
    There is no bp-custom.php in the Plugin folder, so I have to create one with only your code above in it?

    I downloaded some .mo and .po files already, from an older version of Buddypress (that what I am using it for) and placed them in the Language folder (where the .pot file is), but nothing happens. Is this because of the BLANG thing to be done?

    In the ‘yourlangaugename’ part, do I have to fill in my langauge, or the filename of the .po and .mo files?

    Working on this for more than a week, still feel like a dummy…

    Avatar of stwc
    stwc
    Participant

    @stwc

    Yep, add bpcustom.php if it doesn’t exist, and (as I recall) use the filename of the .po and .mo files as your BPLANG.

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

The topic ‘How to start doing a translation’ is closed to new replies.