private function checkLocale( $force_locale = null ) {
		if ( ! $this->user_data[ $this->cache_key ] instanceof GeotRecord || apply_filters( 'geot/cancel_locale_check', false ) ) {
			return;
		}

		$locale = get_locale();
		// get language part of locale
		$wp_locale = strstr( $locale, '_' ) === false ? $locale : strstr( get_locale(), '_', true );
		// normalize some of them to match our locales
		switch ( $wp_locale ) {
			case 'pt':
				$wp_locale = 'pt-BR';
				break;
			case 'zh':
				$wp_locale = 'zh-CN';
				break;
		}
		// when filtering we want english locale to compare city names
		if($force_locale){
			$wp_locale = $force_locale;
		}
		// set locale on all records
		foreach ( get_object_vars( $this->user_data[ $this->cache_key ] ) as $o ) {
			$o->setDefaultLocale( $wp_locale );
		}
	}
private function checkLocale( $force_locale = null ) {
		if ( ! $this->user_data[ $this->cache_key ] instanceof GeotRecord || apply_filters( 'geot/cancel_locale_check', false ) ) {
			return;
		}

		$locale = get_locale();
		// get language part of locale
		$wp_locale = strstr( $locale, '_' ) === false ? $locale : strstr( get_locale(), '_', true );
		// normalize some of them to match our locales
		switch ( $wp_locale ) {
			case 'pt':
				$wp_locale = 'pt-BR';
				break;
			case 'zh':
				$wp_locale = 'zh-CN';
				break;
		}
		// when filtering we want english locale to compare city names
		if($force_locale){
			$wp_locale = $force_locale;
		}
		// set locale on all records
		foreach ( get_object_vars( $this->user_data[ $this->cache_key ] ) as $o ) {
			$o->setDefaultLocale( $wp_locale );
		}
	}
private function checkLocale ( $ force_locale = null ) { if ( ! $ this -> user_data [ $ this -> cache_key ] instanceof GeotRecord || apply_filters ( 'geot/cancel_locale_check' , false ) ) { return ; } $ locale = get_locale ( ) ; // get language part of locale $ wp_locale = strstr ( $ locale , '_' ) === false ? $ locale : strstr ( get_locale ( ) , '_' , true ) ; // normalize some of them to match our locales switch ( $ wp_locale ) { case 'pt' : $ wp_locale = 'pt-BR' ; break ; case 'zh' : $ wp_locale = 'zh-CN' ; break ; } // when filtering we want english locale to compare city names if ( $ force_locale ) { $ wp_locale = $ force_locale ; } // set locale on all records foreach ( get_object_vars ( $ this -> user_data [ $ this -> cache_key ] ) as $ o ) { $ o -> setDefaultLocale ( $ wp_locale ) ; } }
For API results we can let users change locale
but also we can check against wordpress locale

@param null $force_locale
For API results we can let users change locale but also we can check against wordpress locale