Skip to content
This repository has been archived by the owner on Oct 23, 2021. It is now read-only.

Date-picker is in simplified Chinese #55

Open
bhhaskin opened this issue Dec 30, 2014 · 3 comments · May be fixed by #56
Open

Date-picker is in simplified Chinese #55

bhhaskin opened this issue Dec 30, 2014 · 3 comments · May be fixed by #56

Comments

@bhhaskin
Copy link

The date picker is displaying in simplified Chinese rather than English.

@bhhaskin bhhaskin linked a pull request Dec 30, 2014 that will close this issue
@mboynes
Copy link
Owner

mboynes commented Dec 30, 2014

Hmm, this is not a problem for me. Can you share your code to replicate this?

@bhhaskin
Copy link
Author

It seems to be a common issue with the jQuery UI i18n (Internationalization and Localization) date picker itself. The code is pretty simple:

// CPT
function eventCPT() {
    $event = new Super_Custom_Post_Type( 'event' );
    $event->set_icon( 'calendar' );
    $meta = new Super_Custom_Post_Meta( 'event' );
    $meta->add_meta_box(array(
        'id' => 'event_details',
        'fields' => array(
            'date' => array( 'type' => 'date', 'default' => '' ),
            'time' => array( 'type' => 'text', 'default' => '' ),
            'location_text' => array( 'type' => 'text', 'default' => '' ),
            'location_link' => array( 'type' => 'url', 'default' => '' ),
            'signup_link' => array( 'type' => 'url', 'default' => '' ),

            )
        ));
    }

    add_action( 'after_setup_theme', 'eventCPT' );

I tested it on Linux mint and Mac osx to make sure it wasn't just me.

@bhhaskin
Copy link
Author

I have found a better solution. It auto detects the locale using the browser language setting OCG-labs/super-cpt@75865c6

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants