<?php

class WPML_TM_Loader {

	public function load_xliff_frontend() {
		setup_xliff_frontend();
	}

	public function tm_after_load() {
		tm_after_load();
	}

	public function load_pro_translation( $wpml_wp_api ) {
		global $ICL_Pro_Translation;

		if ( ! isset( $ICL_Pro_Translation )
			 && ( $wpml_wp_api->is_admin() || defined( 'XMLRPC_REQUEST' ) )
		) {
			$job_factory         = wpml_tm_load_job_factory();
			$ICL_Pro_Translation = new WPML_Pro_Translation( $job_factory );
		}
	}
}
