Changing English text strings from plugins in WordPress (NOT translating) - wordpress

I have spent hours scouring for a simple answer to this question, to no avail. I've tried three translation plugins also to no avail (WPML, CodeStyling Localization and Loco Translate).
All i want to do is provide my client with a way to define text string changes in WordPress for English. There are NO second languages on the site, I simply want to change one English string for another English string (e.g. change "coupon code" to "discount code"). I would have that there is a standard way to do this, either manually by placing files in wp-content/languages, or by using a plugin that provides an admin interface to edit mo/po files.
CodeStyling Localization is recommended by WooCommerce for editing its text strings - it lists all .mo/.po files and lets you edit the .po then regenerate the .mo. This has no discernible effect on the site, though.
To summarise the situation (i am using latest versions of all mentioned plugins and the WP core):
WordPress is installed with no language definition in wp-config.php (does this mean it defaults to en_US or en_GB - I can't seem to discover that either)? UPDATE: I've stuck to specifying en_GB in wp-config.php now so I can be sure of the language WordPress is running in)
WooCommerce is installed and uses the _e() function for all text strings
CodeStyling localization is installed, and I have successfully edited to en_GB mo/po files and saved and regenerated them
I have confirmed via FTP that the .po file shows the converted text strings once saved
None of the text strings have updated on the frontend
I have tried defining the site language as en_GB in wp-config.php to force the en_GB mo/po files to be loaded for woocommerce, to no avail
All I can guess is that:
The site is ignoring the mo/po files because it thinks there's no "translation" needed because WooCommerce is in English and so is my wordpress install - so it's bypassing the translation files completely
There's a confusion between en_US and en_GB meaning the converted strings aren't loading (maybe the site is en_US but the mo/po i am editing is en_GB, so it's not applying them)
Can anybody shed any light on this?
Thanks

I found the problem: the WPML plugin (which is a translation plugin that supports WooCommerce and multiple currencies) was enabled purely for currency support (not for translations), but had its own default English set to en_US (which overrode my wp-config en_GB settings). This meant none of my changes to en_GB mo/po files for WooCommerce were working. As soon as i corrected WPML's locale for English to en_GB, the changes showed up.

Related

'WordPress' Transliteration of Permalinks Available on one Website, but Not on the Second One

I have two websites, with the same version of 'WordPress' (4.9.1), installed on both (hosted on the same provider). On the first one I set my language to be Serbian Cyrillic. On the second one I made it to be multilingual, by turning on Network Setup. One language is English and second one is Serbian Cyrillic again. When I type in a post or a page title on the first website, WordPress automatically transliterates it from Cyrillic to Latin script (I found this option in the Settings / General section - on the bottom page, and turned it on). HOWEVER, the same option is missing on the second installation of the multilingual / Cyrillic website. Does anybody know why and how to get it back?
I found the file sr_RS.php in \wp-content\languages\ location. And this file was responsible for the field in options and for transliterating permalinks. Probably I've put it over there myself, but it seems now that I forgot that :).
Anyway I found solution and can proceed with building my website.
There is one plugin for the WordPress what can solve your problems regarding complete transliterations and also permalinks.
https://wordpress.org/plugins/serbian-transliteration/

Strings not being translated on Woocommerce in Avada theme

Strings like 'out of stock', 'cart' and 'My Account' are not transltated to Hebrew in the website although they are translated in the .po file.
Wordpress version - 4.7.2
Woocommerce version - 2.6.13
Avada version - 5.0.5
As you can see in the GitHub repository Theme-Fusion/Localization-l10n which stores Avada translation files contributed by users, the strings 'out of stock' and 'My Account' are not translated to Hebrew.
You can :
download this file,
add your own translations,
compile it to a .mo and
upload it to your wp-content/languages/theme/ folder.
Before attempting to make your own translations, we suggest checking the pre-created language files that ships with Avada. All these files have been contributed by our amazing users and the amount of translated strings might vary.
Better, you can submit your own translations by following the instructions provided by Theme Fusion.

existing wordpress website in multiple languages

I have an existing word press website in English language. I want to make a copy of the website in another language. I do not need auto translation as I can enter contents separately. Is there a plugin for this?
Or do I need to have one more wordpress site / subdomain?
There are two ways to go:
WPML or plugin way
WPML or any translation plugin, but personally I find WPML the best option, even though it's not free. The plugin handles everything, string translation, language switcher, page duplication, permalinks etc.
There is also qTranslate, and some others that I've not used.
WPML is the easiest and the best one to use (imo).
WPMU (Wordpress Multi Site)
Other option is creating a multisite (WPMU). Basically you copy the entire wordpress site (and the database), and paste the site to a subfolder on your server that has the name of the translation (if you want German translation you create a de folder).
Then using Search Replace DB script, replace old links in the database with the new ones (matching the folder). And now when you go to www.yoursite.com/de you'll have the same wordpress as the original one, and you can set this one as a German one.
The linking between the two is more tricky since you have to do everything manually (language switcher etc.).
WPMU is lighter on the database then the WPML since you have two separate installations, databases etc. but is less 'automatic'. If you create a post on one wp (English), you'll need to go to the other wp and create it in German. Whereas on WPML there is a duplicate button, so you can just duplicate the page/post etc. and translate it with ease.
Also wpmls 'String Translation' plugin makes it very easy to translate any translatable string inside the theme or plugin you are using. You don't need to pull the .po files, translate them and then paste them back with language code at the end. Wpml does this for you withing the backend.
My opinion: WPML all the way, it's easy and pretty straightforward. Easier for someone who doesn't have that many experience with database transfers etc.

Buddypress: Language not changing

I'm getting crazy because everything seems to be fine, but impossible to get a solution.
I want to translate my buddypress to Spanish.
Seems like I have everything ok:
My language files:
My wp-config
define('WPLANG', 'es_ES');
My config on dashboard: Setted to Spanish
My wordpress version : 4.1.
My wordpress is translated ok once I set the language on the dashboard, anyway the buddypress language does not change.
Any Idea about what could be wrong here??
You need to create and upload the buddypress-es_ES.mo file. The .po files are used to create the .mo file. You don't need to upload the .po files.

Wordpress theme and language pack

I am building a Wordpress blog system in Spanish and I'd like to have the default theme also translated to "es_ES". I am already running this Wordpress installation in Spanish. What I'd like to know is how to do the same with the default theme (twenty-eleven).
This site allows us to download the po file with the translation: http://translate.wordpress.org/projects/wp/3.2.x/twentyeleven/es/default
But I don't know what to do next...
I'd like to know the process. For I have downloaded the PO and MO files from translate.wordpress.org/projects/wp/3.2.x/twentyeleven/es/… and then uploaded them to domain.com/wp/wp-content/themes/twentyeleven/languages however no change occurred...
Thanks.
This post helped me to understand: http://urbangiraffe.com/articles/translating-wordpress-themes-and-plugins/
The missing information in this tuto is that the languages files must be named just like this: if wordpress is set to "es_CL", the .po and .mo files must be named es_CL.po and es_CL.mo and put in the language folder of the theme.
If the file config.php is correctly set to "es_CL" than the system will use the right language files.

Resources