Charitable is a free WordPress plugin that allows you to create fundraising campaigns. To translate Charitable plugin we’ll use TranslatePress.
Some of it’s features include:
- support for a lot of payment gateways: offline, Paypal, Stripe, Authorize.net, PayUMoney, PayFast
- really easy to use : the process of creating a campaign is as simple as creating a page with a few extra fields.
- donation management: access to details, possibility to sort and export donations as a CSV
- unlimited campaigns
- works with any theme and it’s developer friendly so you can extend it if needed
- plenty of addons if you need more features
In this tutorial we’ll setup Charitable and it’s companion theme Reach, import some demo content (so we get up to speed quickly), setup TranslatePress to work with another language and finalize by translating everything in the front-end as well as the emails sent to users.
1. Install Charitable
You can find Charitable directly on the WordPress.org repository. Simply navigate to Plugins -> Add New and search for Charitable. The first result will be the plugin we’re after.
Alternatively, you can download Charitable from https://wordpress.org/plugins/charitable/ and install it manually or via FTP.
2. Install Reach Theme and it’s Childtheme
While Charitable works well with any WordPress theme, we’re going to use the Reach theme.
Once the setup is done, not only we’re translate Charitable plugin, but we’ll also translate the gettext strings that might come from the Reach theme.
We also want to download and install the Reach Childtheme. This way, changes to our theme won’t be deleted if we update the parent theme.
It’s a great way of making CSS and template changes while still receiving bug fixes, security updates and even new features from our parent theme.
3. Install Demo Content
To speed up our setup, we’re going to use the demo content available for Charitable and Reach.
- download the content
- unzip the files found inside: there should be three files
- go to WordPress -> Tools -> Import and choose the WordPress importer.
- import each of the three files and once that’s done we can move forward finalizing the setup.
Installing the demo content will create:
- pages with shortcodes for Charitable in place (and some for Easy Digital Downloads in case you were wondering why some shortcodes are not working)
- five differently setup campaigns: the actual campaign dates are old so you’ll find all are expired, however, a quick modification in the campaign editor will fix that
If you don’t need all of the extra posts and pages, I recommend you only install the campaigns demo content.
4. Setting Up the Homepage
By default, if this was a default WordPress installation, we would have the blog listings on our homepage.
The Reach theme comes with a proper homepage that lists all of the campaigns currently published.
- create a new page called Home
- inside the Page Attributes meta box, select “Homepage” for the “Template” setting
- you can also use a Slider above the main content: Soliloquy, Layer Slider and Revolution Slider are all supported.
- setup WordPress to work with a static homepage from the Customizer or via WordPress -> Settings -> Reading
5. Adding the Campaigns Page in the Menu
Charitable campaigns are actually WordPress custom post types. This means you have an archive page with all of the campaigns available at https://example.com/campaigns/
While you can place the [campaigns] shortcode in any page, when using the Reach theme it’s best to link in the menu to the /campaigns archive page generated by WordPress. You can do that with a Custom Link in the WordPress -> Menus interface.
From the /campaigns/ page we can then view individual campaigns, how much time they have until they close, how much until completion, etc.
Other Charitable specific pages like register, login, your profile can be added to your top menu, making it easy for supporters to access the website and manage their account.
Translate Charitable Plugin
With Charitable installed and configured, we can now translate the campaigns, pages and posts one by one, using TranslatePress.
Since there is specific content created for the fundraising (like the campaigns) we’ll focus to translate Charitable plugin instead of translating the rest of the posts and pages.
1. Install and Setup TranslatePress
You can install TranslatePress by searching for it in the WordPress -> Plugins interface and installing it and activating it from there.
The setup process is straight forward:
- add a second language: I’m using Romanian as the language we want to translate into
- I would also suggest to set “Force Language in Custom Links” to Yes, since we have a custom link in our menu for /campaigns/
2. Translate Charitable Plugin
The translation interface can be accessed from the top admin bar. Once opened, simply hover over strings in the right side and translate them one by one.
The blue icon strings are user generated (like the page title or the content of a post), while green icon strings are gettext strings from your plugins and theme.
To be able to translate your entire website, all you have to do is to navigate the website from page to page. For example, you can even translate all the dynamic pages generated by Charitable by going through the process of Donating:
- visit a campaign page
- click the Donate button
- translate the entire Donation checkout page
- go through with the payment (if you’re the administrator, you can enable the Offline Payment Gateway so you don’t have to go through Paypal)
- if successful, you’ll get redirected to the Receipt page and you can translate this page as well.
An interesting side-effect of the translation interface is that you can use TranslatePress without a secondary language, to simply change various strings from your plugins or theme.
3. Translate Charitable Plugin Emails
Charitable gives us the possibility to modify the emails sent to supporters after a successful donation. Before we can translate those emails, we need to enable them.
Since those emails are never displayed in the front-end, we can not use the translation interface to translate them.
For this there is a conditional language shortcode in TranslatePress that will output the content inside it only if the current language matches the one in the shortcode.
[trp_language language="en_US"] English content only [/trp_language]
Please make sure the language locale (en_US) is correct. If it’s not, the content in the shortcode will not be displayed.
With the help of Charitable and TranslatePress you can create a multilingual fundraising website, making it easier to reach to supporters in their own native language.
While it does require an initial setup, once that is out of the way, you can focus on creating a great campaign and sharing it with as many people as possible all over the world!