I need assistance methods to translate the customized put up kind and taxonomy when utilizing multisite and multi-language.
I’m utilizing subdirectory a /en /sv and so on.
Are utilizing the plugin (Multisite Language Switcher), however cannot change the rewrite settings there. So I’m guesing I’ve to alter some rewrite?
Or ought to I translate the put up kind with translations file, .mo .po?
That is how the put up kind arrange are in capabilities.php.
Ought to I do one thing with the rewrite?
perform create_posttype_product() {
register_post_type( 'product',
array(
'labels' => array(
'title' => __('Merchandise'),
'singular_name' => __('product'),
'add_new' => __('Add new product'),
'add_new_item' => __('New product'),
'edit_item' => __('Edit product')
),
'public' => true,
'rewrite' => array( 'slug' => 'product', 'with_front' => false ),
'has_archive' => 'product',
'menu_icon' => 'dashicons-editor-help',
'helps' => array('title', 'editor', 'thumbnail')
)
);
}
add_action( 'init', 'create_posttype_product' );
So for instance on english webpage url could be:
www.mypage.com/en/merchandise
However for the swedish I would like
www.mypage.com/sv/produkter
And different language :
www.mypage.com/xx/product-name-in-this-language
How can I handle to get this end result? I’ve searched and search and cannot discover the proper reply.