How to translate custom post type name?

Support MB Custom Post Type How to translate custom post type name?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #36000
    ViktorViktor
    Participant

    Hi, I have created custom post types using the visual builder in the main language of the site but the site is multilingual. Now the archive for, say, /locations/ and /en/locations/ always shows the tab title in the original language. I am using Polylang free and there is no way to translate the plural of the CPT "location".

    #36011
    Long NguyenLong Nguyen
    Moderator

    Hi Viktor,

    You can follow Polylang documentation to translate the CPT name https://polylang.pro/doc/multilingual-custom-post-types-and-taxonomies/
    Then you might need to use the code to register the post type https://docs.metabox.io/extensions/mb-custom-post-type/#getting-php-code

    #36015
    ViktorViktor
    Participant

    Thanks for the reply Long. I want to translate the name of the CPT. I have already enabled the CPT in Polylang and can create posts in each language, and archives work correctly. It's just that the title of the archives is always the plural name that I have set in MB and I don't know where to translate it.

    #36025
    Long NguyenLong Nguyen
    Moderator

    Hi,

    The title on the archive page might be controlled by your theme template. You can try to contact their support to ask for help with this issue.

    #36029
    ViktorViktor
    Participant

    I'm using Oxygen, so no theme, but even with a theme it obviously won't know how to call this CPT unless it is manually translated. Abstracting from the tab's title, how do you usually translate the names of the CPTs created in MetaBox

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.