Skip to content

Instantly share code, notes, and snippets.

@mgibbs189
Created November 6, 2017 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mgibbs189/10f54e91ecd70030694db0c2a6d6ed7b to your computer and use it in GitHub Desktop.
Save mgibbs189/10f54e91ecd70030694db0c2a6d6ed7b to your computer and use it in GitHub Desktop.
<?php
add_filter( 'facetwp_i18n', function( $string ) {
if ( isset( FWP()->facet->http_params['lang'] ) ) {
$lang = FWP()->facet->http_params['lang'];
$translations = array();
$translations['cn']['Select'] = 'The Chinese translation for Select';
if ( isset( $translations[ $lang ][ $string ] ) ) {
return $translations[ $lang ][ $string ];
}
}
return $string;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment