Created
January 18, 2021 16:13
-
-
Save mgibbs189/4d340101d6158d53e0fddaba68bdd324 to your computer and use it in GitHub Desktop.
FacetWP - translate date picker (3.7.1+)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add to your (child) theme's functions.php | |
// replace "YOUR_FACET_NAME" with your *actual* facet name | |
add_filter( 'facetwp_render_output', function( $output ) { | |
$output['settings']['YOUR_FACET_NAME']['locale'] = [ | |
'weekdays_short' => ['Dom', 'Lun', 'Mar', 'Mié', 'Jue', 'Vie', 'Sáb'], | |
'months_short' => ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'], | |
'months' => ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'], | |
'firstDayOfWeek' => 1 | |
]; | |
return $output; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment