My language does not support Plural Translation

Some languages disagree on the plural forms, to solve this issue, please add the following code to functions.php of wilcity-childtheme (You can download Wilcity Child theme from http://themeforest.net/downloads)

 

function fix_yourlanguage_plurals( array $data, Loco_Locale $locale ){
    if( 'id' === $locale->lang ){
        $data[0] = 'n > 1';
        $data[1] = array('one','other');
    }
    return $data;
}
add_filter( 'loco_locale_plurals', 'fix_yourlanguage_plurals', 10, 2 );

id: It’s your Language localization.

Then compress wilcity-childtheme -> Log into your WordPress account -> Click on Appearance -> Themes -> Add New -> Install the Child theme and Activate it.

Tagged:

Leave A Comment?