super-cpt
super-cpt copied to clipboard
Date-picker is in simplified Chinese
The date picker is displaying in simplified Chinese rather than English.
Hmm, this is not a problem for me. Can you share your code to replicate this?
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.
I have found a better solution. It auto detects the locale using the browser language setting OCG-labs/super-cpt@75865c63f348f7b23754c9960774e957c4671273