Skip to:
Content
Pages
Categories
Search
Top
Bottom

I want to speak Spotlish


  • trcwest
    Participant

    @trcwest

    Hello all…

    I am making a site called Spots Kenya and i am going to use the buddy press functions for the main social interaction part. Its a location orientated site that is all the \”top Spots\” in Kenya

    In a brief nut shell i want to customise the names of the different things on my site.

    Groups >> Spots

    Group >> Spot

    Members >> Spotters

    Member >> Spotter

    Burtadsit came up with a great Idea of using the translating functions to change these words because which in essence it is just making up a new language \”Spotlish\”

    So i would like some guidence from someone FAMILIAR WITH TRANLATING to different languages.

    – maybe a tutorial on how to do this for buddypress

    – or the software needed

Viewing 22 replies - 26 through 47 (of 47 total)

  • Lance Willett
    Participant

    @lancewillett

    Ah — you mentioned RC1. Then yes, the BuddyPress plugins would be in “mu-plugins” still.

    Write in new language to msgstr within buddypress.pot and save as buddypress-spots.mo

    Make sure you are creating the MO file from a PO file, which is in turn a copy of the POT that is bundled with BuddyPress.

    Your “bp-languages” directory should look something like this:

    buddypress.pot
    buddypress-mysite.po
    buddypress-mysite.mo

    If you have trouble editing the POT or PO in a text editor, you can use special software also — see https://codex.wordpress.org/Translating_WordPress and look for “Translation Tools.” In my opinion those are overkill for this type of thing, though.


    ezrahilyer
    Participant

    @ezrahilyer

    Lance Willett,

    Thank you for clarifying that point. I will be testing it out later tonight.

    -Ezra


    trcwest
    Participant

    @trcwest

    @Lance Willett Thanks for the update in the codex post..

    I have updated things in bp-custom.php and its working like a treat.

    Thanks again.


    Kunal17
    Participant

    @kunal17

    I just came across the customizing labels tutorial and have some questions (newbie alert!). 1) How do I run the command to make the mo file? Currently I access the server through FileZilla.

    2) Is the bp-custom.php file something that I download or create?

    3) The walkthrough says ‘This example uses mysite as the sample language definition; you’ll need to replace it with your own custom definition.’ What would be my custom definition? I am running BP 1.0 with default everything (hardly any changes yet). Do I need to worry about this or just use ‘mysite’?

    I basically want to change the main blog ‘blog’ to news including the slugs and maybe the ‘blogs’ to ‘member blogs’

    Thanks!

    Thanks.

    The Northern Smurfs called a certain object a “bottle smurfer”, while the Southern Smurfs called it a “smurf opener”.

    Language customization is subtly different from language translation but both share similar localization processes, using the same tools.

    ( https://codex.wordpress.org/Localizing_WordPress & https://codex.wordpress.org/Translating_WordPress. Google for more)

    Of course, as Lance accurately stated, using dedicated software is overkill if your intention is to change a small set of frequently used words site-wide (turning “groups” into “teams”, “members” into “players” and so on).

    In which case I’d go for the “slugs” method, as suggested by Andy Peatling, rather than tinker with the language files.

    As always, scale matters.

    If you are interested in managing one or more custom language versions, or if you find yourself willing to change more stuff as it comes, I strongly advise you to consider the software option.

    It’s a personal investment which requires you to do your homework and learn to organize your projects accordingly but the learning curve isn’t that steep, and it will guarantee you less white hair in the long run.

    PoEdit is a good choice, giving you the full benefit of a precious asset: translation memory.

    Once installed on your PC, it creates and maintains databases for each translation project – its original purpose. A feature that can be put to good use for language customization.

    Its rather straightforward user interface lets you focus on the language changes you want to make, with a built in “search” feature to locate words or expressions.

    There is no built in “find & replace” feature as software translation is primarily based on strings and not single word occurrences, which can be located in different strings with different contextual meanings.

    If you really want to batch-replace words, you can achieve this using a text editor like Notepad++. Proceed with extreme caution, though: unexpected replacements using this method are frequent, that you can’t always undo except by hand, which defeats the purpose of the whole process.

    Since language files are usually modified with each new release (added strings, modified strings, different string locations…), you’re also better off handling language file updates that way, keeping the language customization logic independent from the file itself, in PoEdit’s TM (translation memory) safe at home on your PC.

    When upgrading BP, it will spare you tedious language files comparison and copy-paste hell in a river of strings, and will do the job with more accuracy.

    A single mistake in a modified language file can generate cryptic errors which you don’t want to start tracking and debugging in 3,000 + strings distributed in multiple language files.

    PoEdit gives you the ability to manage multiple language files using a single TM database (or as many as you wish).

    This is especially useful when you know that the number of language files to be handled gets larger as your platform grows (plugins, themes and templates sometimes have their own – and should).

    Using PoEdit will give you the required semantic homogeneity among all language files belonging to the same project, seamlessly.

    This is where translators make significant productivity gains. And so can you.

    What is more, the software approach scales nicely:

    If you want to leverage your community’s knowledge for language customization – Klingon, Smurf, slang, professional jargon, secret dialect, whatever… – you may want to install Pootle

    ( http://translate.sourceforge.net/wiki/ ), an open source collaborative translation platform that does the same as PoEdit, on your server, and upload the languages files for collective customization – the scenario is yours.


    Kunal17
    Participant

    @kunal17

    Ok, I see now that I have to create the bp-custom.php file myself.

    Still do not know how to run the command to create a .mo file. Do I use cpanel or ftp software for this? Would poEdit, create a .mo file that I can just upload? (Thanks Gilbertc for the above clarification, I’ll definitely look into PoEdit for the long run but currently I only need ‘blog’ to be ‘news’ everywhere :))

    Also, what is the ‘mysite’ language translation as defined in the tutorial?

    Thanks.


    craig-dean
    Participant

    @craig-dean

    Also not understanding the conversion of the po. to the mo. using the run command. Is it a ftp app command. Just not sure.


    2583498
    Inactive

    I’m at wits end… for the life of me I can’t figure out what I’m doing wrong.

    I’ve follow the directs in the developer docs a few times and I just cant seem to make any of the language changes go through. Could it be that my bp-custom.php file isn’t loading?


    2583498
    Inactive

    yup… my bp-custom.php file wasn’t loading. Once I moved it out of the buddypress folder and into the plugins folder the language change worked… anyone know why that is?


    Kunal17
    Participant

    @kunal17

    Still wondering about the command to convert .po to .mo. How is that run and from where?


    Lance Willett
    Participant

    @lancewillett

    @Kunal17

    Is the bp-custom.php file something that I download or create?

    You create it yourself, and place it in “/wp-content/plugins”.

    What is the ‘mysite’ language translation as defined in the tutorial?

    That is a sample definition that I used for the tutorial — you can use whatever you want. Just make it a label that makes sense to you and your site.

    Still wondering about the command to convert .po to .mo. How is that run and from where?

    Running that command requires that your web server have basic GNU gettext support — if you don’t know if it’s supported, ask your host (it’s pretty standard on most Linux servers).

    Running this command also requires command line access to your server via a program like PuTTY (Windows), Terminal.app (Mac), or from inside an FTP program and requires that your server support “msgfmt”. If you do not know how to run commands like this, or don’t have command line access to your server, please see Translating WordPress for other software options for converting language files (like Poedit).

    @Craig dean

    Also not understanding the conversion of the po. to the mo. using the run command. Is it a ftp app command. Just not sure.

    See me answer above. I also updated the Codex page with these notes.

    @Mstoppay

    my bp-custom.php file wasn’t loading. Once I moved it out of the buddypress folder and into the plugins folder the language change worked… anyone know why that is?

    Yes, as of BuddyPress 1.0 the “bp-custom.php” should be placed in the “plugins” folder instead of inside the BuddyPress directory, as noted by Andy in this thread. Thanks for the reminder — I updated the Codex page to note the correct location.

    Note also that if you use the “Automatic upgrade” option to update your BuddyPress install, make sure to backup your language files first since they could be removed during the upgrade process (see this thread).


    Kunal17
    Participant

    @kunal17

    I created the translated file buddypress-mysite.mo and uploaded to the bp-languages folder. However when I place the below code in bp-custom.php and upload to the plugins folder it gives me an error

    define( ‘BPLANG’, ‘lance’ );

    if ( file_exists( BP_PLUGIN_DIR . ‘/bp-languages/buddypress-‘ . BPLANG . ‘.mo’ ) ) {

    load_textdomain( ‘buddypress’, BP_PLUGIN_DIR . ‘/bp-languages/buddypress-‘ . BPLANG . ‘.mo’ );

    }

    I am guess its something to do with the fact that I have not replaced ‘lance’ with my own website label. What should this label be and where can I find mine?

    Thanks.


    Lance Willett
    Participant

    @lancewillett

    What should this label be and where can I find mine?

    You have to make it up — it doesn’t come from anywhere. ;) Make sure the definition you choose and the language filenames match since that is how they are loaded.

    define( ‘BPLANG’, ‘lance’ );

    Ah, that was my mistake. The example should use ‘mysite’ there (I’ve fixed that, thanks for pointing it out).


    Kunal17
    Participant

    @kunal17

    Thanks for clarifying that Lance. However, now I get this error when I browse to my website->

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

    Warning: Cannot modify header information – headers already sent by (output started at /home/kunal17/public_html/theindianstartup/wp-content/plugins/bp-custom.php:4) in /home/kunal17/public_html/theindianstartup/wp-includes/pluggable.php on line 856

    the .mo file is name buddypress-mysite.mo


    Kunal17
    Participant

    @kunal17

    Still looking for some help with my error.

    Should the ‘mysite’ in (BPLANG’, ‘mysite’) be ‘buddypress-mysite’ as my .mo file is called buddypress-mysite.mo?


    Lance Willett
    Participant

    @lancewillett

    Kunal17,

    Is there anything else in your “bp-custom” file? Also make sure there are no spaces before and after the opening and closing <?php> tags.

    Could you post the entire contents of the “bp-custom” file to http://buddypress.pastebin.com/ so we can look at it?


    Kunal17
    Participant

    @kunal17

    php????

    aaahhhhh…

    I created a new bp-custom file for this, forget about the php tags and just copied the code from the codex page (I did include a newbie alert in an earlier post :)).

    It works fine now. Thanks Lance.


    3078940
    Inactive

    I’ve followed the tutoral “Customizing Labels, Messages, and URLs” for customising text messages and it works but while browsing site an warning message occurs

    Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at Z:homeneoforman.comwwwblogwp-contentpluginsbp-custom.php:1)

    my bp-languages folder contains files: buddypress-nfm.mo and buddypress-nfm.po

    my bp-custom.php looks as follows

    <?php

    define( 'BPLANG', 'nfm' );

    if ( file_exists( BP_PLUGIN_DIR . '/bp-languages/buddypress-' . BPLANG . '.mo' ) ) {

    load_textdomain( 'buddypress', BP_PLUGIN_DIR . '/bp-languages/buddypress-' . BPLANG . '.mo' );

    }

    ?>

    it doesn’t contain any other code.

    I’ve started the translation after upgrading to 1.0.1 version of Buddypress.

    Could anybody advice me where am I wrong?


    Allen Weiss
    Participant

    @amweiss

    I have done everything people appear to be saying, but still don’t get the translation (a very simple change from Avatar to Photo. I made the .po and .mo (using PoEdit) and uploaded them to the server

    buddypress-Alumni.po and .mo are in the /bp-languages folder and the bp_custom.php is the /plugs/buddypress folder, with this code

    <?php

    define( ‘BPLANG’, ‘Alumni’ );

    if ( file_exists( BP_PLUGIN_DIR . ‘/bp-languages/buddypress-‘ . BPLANG . ‘.mo’ ) ) {

    load_textdomain( ‘buddypress’, BP_PLUGIN_DIR . ‘/bp-languages/buddypress-‘ . BPLANG . ‘.mo’ );

    }

    ?>

    Last step seems to be reloading Buddypress (although I’m not sure how to do this).

    Any clue what I should be doing differently to get this to work?

    Thanks


    chewbaker
    Participant

    @chewbaker

    i dont think this works anymore… anyone figure out a way to do this in newer versions?

    What *exactly* doesn’t work? Impossible to help otherwise. Also, I suggest you start a new thread – this one has been marked as complete which means many people won’t read it :)


    arifinez
    Participant

    @arifinez

    How to work with both customized and translation .mo files?

    1. I’ve uplaoded an id_ID translation (mo) file and using the multilingual plugin, it’s works.

    2. I’ve made a bp-custom.php to change ‘wire’ slug into ‘memo’. It’s working on my translation pages, but not with the default english contents (‘memo’ URL’s are fine, but not with menus and ‘wire’ related texts).

    <?php

    define( 'BP_WIRE_SLUG', 'memo' );

    ?>

    3. I’ve made a customized PO file (english) to fix this and load the MO language file with bp-custom.php. Now the english language is working (URL’s and contents), but those changes made some of my id_ID translation turns back into english (some ‘memo’ related translation) but the rest translation is fine…

    <?php

    define( 'BP_WIRE_SLUG', 'memo' );

    define( 'BPLANG', 'memomu' );

    if ( file_exists( BP_PLUGIN_DIR . '/bp-languages/buddypress-' . BPLANG . '.mo' ) ) {

    load_textdomain( 'buddypress', BP_PLUGIN_DIR . '/bp-languages/buddypress-' . BPLANG . '.mo' );

    }

    ?>

    Did i made any mistake with those steps?

    Is it allright using both customized and translation .mo files?

    please help, thanks!

Viewing 22 replies - 26 through 47 (of 47 total)
  • The topic ‘I want to speak Spotlish’ is closed to new replies.
Skip to toolbar