Translating Better Sharing
The Better Sharing block and templates are fully translatable through the combination of the admin UI and the provided language template file (POT).
For text strings that appear on the front end templates including placeholder text in fields, these strings can all be updated to the preferred language by directly editing the
block templates.
For text strings that appear as field labels and other static text, these are included within the provided POT file located in /better-sharing/languages/ which is accessable by 3rd party tools to provide translations on the fly.
Translating the POT file
- Navigate to the plugin's code directory to /better-sharing/languages/
- Save a copy of the better-sharing-wp.pot to work from with the translation software (i.e. POEdit, etc.)
- Open the better-sharing-wp.pot with the translation and select option to create a new translation with the POT file,
- Select the language of the translation.
Note: this will usually set the ISO language code for the translation; however, it is suggested to confirm the correct code is used - Select the Source Text to be translated then enter the preferred text in the Translation field. Do NOT alter the Source Text, otherwise the translation will not work.
- Save the translated file as better-sharing-wp-xx_XX.po where xx_XX is the language code of the final translated file.
- Upload both the better-sharing-wp-xx_XX.po and compiled better-sharing-wp-xx_XX.mo files to the /better-sharing/languages/
Important note: if the translation does not work, ensure that both the PO and MO files have been named correctly with the matchign language code as the WordPress installation (i.e. the Settings » General » Site Language) and have been uploaded to the /better-sharing/languages/ directory. The PO file informs the site as to what text to change; however, the MO file is what displays the new text.
Related Articles
Customizing the Better Sharing Email Template for IgnitionDeck
Better Sharing automatically creates a sharing block and email template that can be further customized. The email template, located in Better Sharing » Email Templates, can be edited to accomodate custom messaging and has a set variables that are ...
Better Sharing Settings
There are 4 default (and 1 optional) settings to be configured for the Better Sharing plugin. 1. Email Branding The website or company name to be used as a suffix on the sender's name in the email (i.e. John via Company Name). Recommendations ...
Installing Better Sharing
There are three (3) ways to install the Better Sharing plugin on your WordPress website. 1. Keyword search via the WP Admin » Plugins menu Navigate to the WP-admin Dashboard » Plugins Select ‘Add New" from the top of the page. Search the list using ...
Troubleshooting Better Sharing
Sharing Modal will not open (or close) This is most likely a Javascript issue either due to Javascript not being enabled in the browser or a conflict with another element on the page. Try a different browser, or temporarily switch themes / disable ...
Styling Better Sharing elements
Better Sharing elements can be styled to match the site's appearance using CSS in the theme's style.css or by using the WP Appearance » Customize » Additional CSS field. Each Block has a Layout Wrapper CSS Class which can be used to target the ...