: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
function icl_get_languages_names() {
static $__icl_lang_names_cached = null;
if ( $__icl_lang_names_cached === null ) {
$serialized_languages = file_get_contents( WPML_PLUGIN_PATH . '/res/languages.json' );
$__icl_lang_names = json_decode( $serialized_languages, true );
$__icl_lang_names_cached = $__icl_lang_names;
return $__icl_lang_names_cached;
function icl_get_languages_codes() {
if ( null === $result ) {
'Chinese (Simplified)' => 'zh-hans',
'Chinese (Traditional)' => 'zh-hant',
'Norwegian Bokmål' => 'no',
'Norwegian Nynorsk' => 'nn',
'Portuguese, Brazil' => 'pt-br',
'Portuguese, Portugal' => 'pt-pt',
'Rhaeto-Romance' => 'rm',
'Serbo-Croatian' => 'sh',
function icl_get_languages_locales() {