components/I18n/I18n.php
public function admin_assets() {

		wp_enqueue_script(
			'pods-admin-i18n',
			PODS_URL . 'components/I18n/pods-admin-i18n.js',
			array(
				'jquery',
				'pods-i18n',
			),
			'1.0',
			true
		);
		$localize_script = array();
		if ( ! empty( $this->languages ) ) {
			foreach ( $this->languages as $lang => $lang_data ) {
				$lang_label = $this->create_lang_label( $lang_data );
				if ( ! empty( $lang_label ) ) {
					$lang_label = $lang . ' (' . $lang_label . ')';
				} else {
					$lang_label = $lang;
				}
				$localize_script[ $lang ] = $lang_label;
			}
		}
		wp_localize_script( 'pods-admin-i18n', 'pods_admin_i18n_strings', $localize_script );

		// Add strings to the i18n js object
		add_filter( 'pods_localized_strings', array( $this, 'localize_assets' ) );
	}
public function admin_assets() {

		wp_enqueue_script(
			'pods-admin-i18n',
			PODS_URL . 'components/I18n/pods-admin-i18n.js',
			array(
				'jquery',
				'pods-i18n',
			),
			'1.0',
			true
		);
		$localize_script = array();
		if ( ! empty( $this->languages ) ) {
			foreach ( $this->languages as $lang => $lang_data ) {
				$lang_label = $this->create_lang_label( $lang_data );
				if ( ! empty( $lang_label ) ) {
					$lang_label = $lang . ' (' . $lang_label . ')';
				} else {
					$lang_label = $lang;
				}
				$localize_script[ $lang ] = $lang_label;
			}
		}
		wp_localize_script( 'pods-admin-i18n', 'pods_admin_i18n_strings', $localize_script );

		// Add strings to the i18n js object
		add_filter( 'pods_localized_strings', array( $this, 'localize_assets' ) );
	}
public function admin_assets ( ) { wp_enqueue_script ( 'pods-admin-i18n' , PODS_URL . 'components/I18n/pods-admin-i18n.js' , array ( 'jquery' , 'pods-i18n' , ) , '1.0' , true ) ; $ localize_script = array ( ) ; if ( ! empty ( $ this -> languages ) ) { foreach ( $ this -> languages as $ lang => $ lang_data ) { $ lang_label = $ this -> create_lang_label ( $ lang_data ) ; if ( ! empty ( $ lang_label ) ) { $ lang_label = $ lang . ' (' . $ lang_label . ')' ; } else { $ lang_label = $ lang ; } $ localize_script [ $ lang ] = $ lang_label ; } } wp_localize_script ( 'pods-admin-i18n' , 'pods_admin_i18n_strings' , $ localize_script ) ; // Add strings to the i18n js object add_filter ( 'pods_localized_strings' , array ( $ this , 'localize_assets' ) ) ; }
Load assets for this component

@since 0.1.0
Load assets for this component