po catalog file you created.Ģ) Now, go to “Catalog > Update from POT file…”, and navigate to the /plugins/buddypress/buddypress.pot file (For older versions of BuddyPress, this file is located at /plugins/buddypress/bp-languages/buddypress.pot).ģ) Opening the file will show an “Update Summary” window, which shows you the new strings added and the obsolete strings that will be removed. You can do this by following these instructions:ġ) Start PoEdit and go to “File > Open”. To remain up-to-date, you will need to merge this new file with your custom. When a new version of BuddyPress is released, a new BuddyPress POT file is generated. Go ahead and repeat this process for the other labels you want to change and when you’re done, hit “Save”. Now, you will see a list of all the BuddyPress language strings you can modify.Ĭlick on any string you wish to change and make the adjustment in the bottom half of the screen. If you’re using a different language on WordPress, change “en_US” to the locale of your WordPress install.ģ) Changing strings and saving the changes Save your language file as “buddypress-en_US.po”. This will open a settings dialog and you will be asked to fill in some details such as project name which we’ll skip.Ĭlick on ‘OK’ and you’ll be asked to save your language file. On the main menu select “File > New catalog from POT file”, navigate to the BP languages folder (/wp-content/plugins/buddypress/bp-languages/)and select the ‘buddypress.pot’ file. If you are not comfortable working at the command line then it is highly recommended to use this application.Ģ) Select the BuddyPress translation file PoEdit is a lightweight application for editing and creating. Test and verify your changes by loading BuddyPress. Once you’ve activated the plugin, visit WP Admin > Tools > WPT Custom Mo File to upload your custom. mo file will be used is via a plugin available on the WordPress plugin repository: WPT Custom Mo File. WordPress 4.6 changed how language files are enqueued, preferring the GlotPress-provided “canonical” language file over a custom language file. If the /wp-content/languages/plugins/ folder does not exist, create it! MO file, move both the PO and MO files to /wp-content/languages/plugins/ on your server. MO file should be similarly named – buddypress-en_US.mo. Then make the changes you want in a text editor or by using a specialized language localization editor like PoEdit (this is recommended if you are not comfortable using a text editor to make changes to the. Open the POT file in wp-content/plugins/buddypress/buddypress.pot, make a copy of the file and rename it to buddypress-en_US.po. You’ll need to replace ‘en_US’ with the locale of your WordPress site. This example uses en_US as the sample language definition and thus buddypress-en_US.mo is the name of the language file you will create. Here are the steps to create your own custom messages and labels without doing a full language translation. Overall, creating a custom language file is a better long-term solution than hand-changing plugin or theme files since you can make changes in one place for all labels and messages used in BuddyPress. Even though theme customizations are recommended and encouraged, it is nice to have your customizations in one place. The most compelling reason to use this method of changing labels and messages is to avoid hand-changing labels and messages in plugin and theme files. If you intend BuddyPress to be used in a language other than English, see the Language Translations page. Note: This is not intended for full language translations. Do you want to change various labels and messages in BuddyPress, but don’t want to hack the core files to do so? This page explains how to use a language translation file to customize BuddyPress labels, messages, and URL slugs.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |