public function set_diacritic_language( $lang = 'en-US' ) {
		if ( isset( $this->data['diacriticLanguage'] ) && $this->data['diacriticLanguage'] === $lang ) {
			return;
		}

		$this->data['diacriticLanguage'] = $lang;
		$language_file_name              = \dirname( __FILE__ ) . '/diacritics/' . $lang . '.json';

		if ( \file_exists( $language_file_name ) ) {
			$diacritics_file              = \json_decode( \file_get_contents( $language_file_name ), true );
			$this->data['diacriticWords'] = $diacritics_file['diacritic_words'];
		} else {
			unset( $this->data['diacriticWords'] );
		}

		$this->update_diacritics_replacement_arrays();
	}
public function set_diacritic_language( $lang = 'en-US' ) {
		if ( isset( $this->data['diacriticLanguage'] ) && $this->data['diacriticLanguage'] === $lang ) {
			return;
		}

		$this->data['diacriticLanguage'] = $lang;
		$language_file_name              = \dirname( __FILE__ ) . '/diacritics/' . $lang . '.json';

		if ( \file_exists( $language_file_name ) ) {
			$diacritics_file              = \json_decode( \file_get_contents( $language_file_name ), true );
			$this->data['diacriticWords'] = $diacritics_file['diacritic_words'];
		} else {
			unset( $this->data['diacriticWords'] );
		}

		$this->update_diacritics_replacement_arrays();
	}
public function set_diacritic_language ( $ lang = 'en-US' ) { if ( isset ( $ this -> data [ 'diacriticLanguage' ] ) && $ this -> data [ 'diacriticLanguage' ] === $ lang ) { return ; } $ this -> data [ 'diacriticLanguage' ] = $ lang ; $ language_file_name = \ dirname ( __FILE__ ) . '/diacritics/' . $ lang . '.json' ; if ( \ file_exists ( $ language_file_name ) ) { $ diacritics_file = \ json_decode ( \ file_get_contents ( $ language_file_name ) , true ) ; $ this -> data [ 'diacriticWords' ] = $ diacritics_file [ 'diacritic_words' ] ; } else { unset ( $ this -> data [ 'diacriticWords' ] ) ; } $ this -> update_diacritics_replacement_arrays ( ) ; }
Sets the language used for diacritics replacements.

@param string $lang Has to correspond to a filename in 'diacritics'. Optional. Default 'en-US'.
Sets the language used for diacritics replacements .