WordPress NavXT plugin localization
WordPress NavXT plugin localization
WordPress NavXT plugin localization
Retrieved menu items pass through wp_get_nav_menu_items filter, as well as few others in wp_get_nav_menu_items() and around. — EDIT – This is what I used: function translate_menu( $items, $menu, $args ) { foreach ( $items as $key => $item ) { $items[$key]->title = _($items[$key]->title); } return $items; }
There is no technical problem in doing so, and there won’t be any complications or errors. However, it could be that not all content on the site will be in Indonesian. Some strings in themes and in other places in the front-end are outputted by WordPress, and as all strings are in English in WordPress … Read more
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
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.
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
How do I make this plugin translation-ready?
You have a UTF-8 encoding issue. You are seeing single, unprintable bytes. That suggests the data is either stored in a single byte character set, or something is converting it from UTF-8 to a single byte character set. Regarding PO files (actually MO files are what WordPress reads). These need to be UTF-8 encoded. You … Read more
You already have the answer, but perhaps you’re not running your code early enough. Returning true from the override_load_textdomain filter will prevent all MO files from loading, but you’ll have to run it early to catch WordPress Core translations. Adding it as a must-use plugin does the trick for me: /* Plugin Name: Disable Gettext … Read more
In the General Settings page there is a “Site Language” option – if you select “English (United States)” and Save Changes, the localised version upgrade option will disappear. Selecting any other Language option will localise WordPress.