change page name on page list

You can change built in post type labels with the post_type_labels_{$post_type} filter: function wpd_change_page_labels( $labels ) { $labels->menu_name=”Specials”; $labels->name=”Specials”; $labels->singular_name=”Special”; return $labels; } add_filter( ‘post_type_labels_page’, ‘wpd_change_page_labels’ ); EDIT- Refer to register_post_type for a full list of labels, there are probably some others you’ll want to add to this.

How to translate WP plugin name?

I didn’t find the right way but figured out this way: if (get_locale() == ‘fa_IR’) { parent::__construct( ‘araccordion_widget’, __(‘افزونه وردپرس’, $text_domain), array( ‘description’ => __( ‘توضیحات افزونه به زبان فارسی در اینجا نوشته میشود.’, $text_domain ), ) ); } else { parent::__construct( ‘araccordion_widget’, __(‘WordPress Widget’, $text_domain), array( ‘description’ => __( ‘The description in English, goes … Read more

Gtranslate function with custom menu

Link menu item with URL = #, Link Text = Global and add CSS Classes = gtranslate-parent to the newly created menu item. After that you can configure GTranslate and set Widget look = (Flags with language name/Flags with language code/Language names/Language codes) and it will appear as a dropdown when you hover on the … Read more

Auto translate plugin text-domain [closed]

I’m not sure about plugins that would do that, but I can definitely recommend this software: https://poedit.net/ It won’t translate automatically every phrase, but it suggests pretty accurate string translations. The pro version also has the option to retrieve all translation ready strings from a theme or plugin. It lets you to easily update and … Read more

Translations in source code

This is “normal” in WordPress 5 as this is what the new wp_set_script_translations function is for. The function tells WordPress to associate a JSON file containing translations with a specific script that will make use of them. It makes use of them as you see, by embedding the translations as JavaScript objects. You say this … Read more

ACF + WPML: How to translate date fields?

You can use the global $wp_locale to get the month translated in each language. You just need to get the month number (01 to 12) from the Acf field. You have the functions in the WP_Locale class get_month() and get_month_abbrev() global $wp_locale; $month = $wp_locale->get_month(04); // Output april in english $month_abbrev = $wp_locale->get_month_abbrev($month); // Output … Read more