load language file

you don’t need to edit functions.php (moreover don’t edit this line or it will break the localisation of the theme, because arcade, is the code used to know where to search translations) according to the line you read in functions.php, you have to put fr_CA.mo and fr_CA.po in wp-content/themes/arcade-basic/library/languages

When translating not all string are present in POedit

PO/MO files’ content depends on the theme/plugin developer. So you bought a half-ready theme… One way is translate strings in php files, but with this you loose the chance to update that, because updates will overwrite your changes. I suggest you: translate the strings with po/mo, than send the updated files to the developer too, … Read more

Plugin Translation project not found

Translating WordPress plugins is an experimental project. Not all plugins listed in the repo are available yet. Quoting the translating WordPress page, The project currently contains only a couple of experimental plugins for translation.

WordPress Localization error within return value

sprintf() can be used to break the string up so that the translatable string can be isolated from the HTML: function new_excerpt_more( $more ) { return sprintf( ‘<a href=”https://wordpress.stackexchange.com/questions/206823/%1$s”><span class=”readmore”>%2$s</span></a>’, get_permalink( get_the_ID() ), __( ‘Read More’, ‘your-textdomain’ ) ); } add_filter( ‘excerpt_more’, ‘new_excerpt_more’ );

Multi Site Translate Strings

WP has very good support for this. You will be Internationalizing and then Localizing your theme. Internationalization is often abbreviated as “i18n” because there are 18 letters between the ‘i’ and the ‘n’. The Codex provides a great reference on what needs to be done here: https://codex.wordpress.org/I18n_for_WordPress_Developers Much of the work involves wrapping strings with … Read more

Localize strings from db

There are multiple ways to do this: 1. Add multiple columns to the table with the strings you have to localize. E.g. one column for German, one for English, and so on. And then get the string from the appropriate column. This is perfect if the number of languages stays more or less constant (you … Read more

translate_user_role doesn’t work

Please note that translate_user_role doesn’t work in the front-end currently. Here is a workaround, you can place this in your theme: add_action( ‘init’, ‘load_admin_textdomain_in_front’ ) function load_admin_textdomain_in_front() { if ( ! is_admin() ) { load_textdomain( ‘default’, WP_LANG_DIR . ‘/admin-‘ . get_locale() . ‘.mo’ ); } }