WordPress.org

Support

Support » Plugins and Hacks » Custom Post Type UI » [Resolved] Make labels automatically multilingual

[Resolved] Make labels automatically multilingual

  • Hi! Great plugin.

    For non-English sites with many post types, it’s cumbersome to edit all labels to match the actual language the rest of the backend is rendered in.

    In lines 118-128 of custom-post-type-ui.php, default labels could be built based on the core WordPress translations. I know this might not work for languages that don’t follow the same Verb + Noun order, but for most this would be enough, and probably better than the English defaults.

    For example:
    $cpt_labels['add_new'] = ( $cpt_post_type[2]["add_new"] ) ? $cpt_post_type[2]["add_new"] : 'Add ' .$cpt_singular;
    becomes:
    $cpt_labels['add_new'] = ( $cpt_post_type[2]["add_new"] ) ? $cpt_post_type[2]["add_new"] : __('Add').' ' .$cpt_singular;

    I manually did this on my setup, but it would be good if it was changed on the plugin core.

    Thanks!

    http://wordpress.org/plugins/custom-post-type-ui/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Michael Beckwith

    @tw2113

    Aha, thank you for pointing out these missed strings. I won’t argue at all about making as much translatable as possible. It’s just hard to catch all the spots at times. I can’t say for sure it’ll be in the next release, pending, but will for sure in the release after that if not.

    Thanks! The good thing about this change is that all these “Add”, “Edit”, “Search” strings are already translated in WordPress’ translations, so changing those 5 lines automatically translates those custom post type labels without having to change the CPT UI translation files.

    Plugin Author Michael Beckwith

    @tw2113

    Chances are I’ll run it through poedit once more just to make sure. Also I think that’d add line number references appropriately as well.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Make labels automatically multilingual’ is closed to new replies.
Skip to toolbar