GUID to related post not in current language
GUID to related post not in current language
GUID to related post not in current language
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
If I am correct (I am not familiar with the plugin itself) it actualy means that you have/use more then one text-domain in your function(s) or theme template(s) as in (just an example): _e( ‘Your Ad here’, ‘my-text-domain’ ) / _e( ‘Your Ad here’, ‘your-text-domain’ ) You should always use one text-domain for your functions … Read more
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’ );
Use plugin_locale filter: apply_filters( ‘plugin_locale’, $locale, $domain ); Change locale like this: $my_plugin_domain = ‘my_plugin_domain_name’; $override_locale=”es-ES”; add_filter(‘plugin_locale’, function ($locale, $domain) use ($my_plugin_domain, $override_locale) { if($domain == $my_plugin_domain) { $locale = $override_locale; } return $locale; }, 10, 2);
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’ ); } }
Get a WPML plugin – https://wpml.org/ Seriously, get it – it’s the most complete solution for multilingual WP site. You can write your own code to translate menu items, but it is not worth it.
444 would not stop a file being deleted. Deletion observes the permissions of the containing directory only. Whether the file is writable is irrelevant, because you’re not writing to it. Other people have posted they results using the filter approach. I suggest you have a look through their follow ups. Please note that 1.x version … Read more
I ended up having to switch to arrays instead of objects. Even that hasn’t worked out as well as I hoped.
Be careful: not less than is not the identfier, but indeed the real English string that should be used by default. In WordPress, you’d use it like this: __( ‘Hello World’, ‘mytextdomain’ ); If someones translates it into de_DE, they would translate Hello World to Hallo Welt. To answer your question: the default locale in … Read more