Skip to:
Content
Pages
Categories
Search
Top
Bottom

Translations – to rename parts of BP


  • oldskoo1
    Participant

    @oldskoo1

    Hi,

    I was hoping to get some help on creating a translations file.

    I posted a while ago asking if i could change the word blog to diary and post to entry.

    Others have asked if they can change wire to something else or groups to contacts.

    All the sensible suggestions have been to create a custom translations file. This is a great idea because editing all the separate files will be EXTREMELY hard to manage for upgrades.

    I’ve tried to create a translations file but i’m finding it quite hard to understand. I tried to follow what it said on the WP site but the file didn’t make sense to me.

    If someone can help show me how to create a translations file in windows i would be very grateful.

    I have the BP POT file : http://svn.buddypress.org/trunk/bp-languages/buddypress.pot

    But please could someone explain what i should do next and which windows program will turn it into and MO file and where i should define my language within BP?

    Cheers,

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

  • oldskoo1
    Participant

    @oldskoo1

    Ok i found a few sites that made a bit more sense and i pieced all the bits together.

    I downloaded the POT file fomr the bp SVN.

    Downloaded a program called POEDIT

    Created a new catalog from the PO file

    Made my translations

    Save the file which created an MO file

    Eventually figured out i needed to upload my MO file to the bp-languages DIR in the mu-plugins DIR of WP

    Then i opened up bp-core.php and found the line

    (`)

    if ( file_exists( ABSPATH . ‘wp-content/mu-plugins/bp-languages/buddypress-‘ . get_locale(). ‘.mo’ ) )

    load_textdomain( ‘buddypress’, ABSPATH . ‘wp-content/mu-plugins/bp-languages/buddypress-‘ . get_locale() . ‘.mo’ );

    (`)

    I couldn’t find out anything on get_locale() function that mean’t anything to me so i just removed get_locale() and replaced it with my .mo filename.


    danbpfr
    Participant

    @chouf1

    hi oldskoo,

    you get wrong by retrieving the (get locale() because at the next update of your bp-core.php file, this will be back again.

    And what do you think what are the language settings on site and blogs for ?

    wp-content/mu-plugins/bp-languages/buddypress-' . get_locale(). '.mo'

    this line means /path/to/your/locale language settings and call the translation file buddypres-en.mo (note the hyphen)

    get_locale() comes sometimes along with get_domain(), who entend something like en_US.mo or de_DE…

    You will find some functions using locale() and domain() in wp-includesl10n.php

    wich is one of the language setting file.

    I think more logical is to use WPLANG:

    if ( file_exists( MUPLUGINDIR . ‘/bp-languages/buddypress-‘ . WPLANG . ‘.mo’ ) )

    load_textdomain( ‘buddypress’, MUPLUGINDIR . ‘/bp-languages/buddypress-‘ . WPLANG . ‘.mo’ );

    As my system locale is different.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Translations – to rename parts of BP’ is closed to new replies.
Skip to toolbar