Multilingual support

TheCartPress supports multilingual by using the WordPress plugins that provide this service. TheCartPress supports, since its first version, WPML and, later, qTranslate.
But TheCartPress allows plugin developers to add their own plugins using the filter tcp_get_multilingual_template_path multilingual.

With this filter the plugins can add theirs own multilingual templates. Those template should define the next functions:

<?php
/**
 * Returns the ISO code of the current language.
 * tcp_get_admin_language_iso returns the back-end ISO code language
 */
function tcp_get_current_language_iso() {
	return tcp_get_admin_language_iso();
}

/**
 * Returns the post id in the default language from a given post_id.
 * For Example, WPML has different post_id for each translation, while qTranslate stores the translation into the same post_id (so qTranslate returns the same post_id).
 */
function tcp_get_default_id( $post_id, $post_type = 'tcp_product' ) {
	return $post_id;
}

/**
 * Returns the post id in the current language from a given post_id.
 * For Example, WPML has different post_id for each translation, while qTranslate stores the translation into the same post_id (so qTranslate returns the same post_id).
 */
function tcp_get_current_id( $post_id, $post_type = 'tcp_product' ) {
	return $post_id;
}

/**
 * Returns the list of translations from a given post_id or false if the plugin doesn't support this action
 * Example of returned array
 * array(2) {	["en"]=> object(stdClass)#45 (6) { ["translation_id"]=> string(2) "11" ["language_code"]=> string(2) "en" ["element_id"]=> string(1)  "9" ["original"]=> string(1) "1" ["post_title"]=> string(21) "Tom Sawyer Adventures"       ["post_status"]=> string(7) "publish" }
 * 				["es"]=> object(stdClass)#44 (6) { ["translation_id"]=> string(2) "12" ["language_code"]=> string(2) "es" ["element_id"]=> string(2) "10" ["original"]=> string(1) "0" ["post_title"]=> string(27) "Las Aventuras de Tom Sawyer" ["post_status"]=> string(7) "publish" } }
 */
function tcp_get_all_translations( $post_id, $post_type = 'tcp_product' ) {
	return false;
}

/**
 * Returns the default language (Deprecated)
 */
function tcp_get_default_language() {
	return $this->tcp_get_current_language_iso();
}

/**
 * Returns the current language (Deprecated)
 */
function tcp_get_current_language() {
	return $this->tcp_get_current_language_iso();
}

/**
 * This function adds a post identified by the $translate_post_id as a translation of the post identified by $post_id
 */
function tcp_add_translation( $post_id, $translate_post_id, $language, $post_type = 'tcp_product' ) {
	return;
}
?>

Related

tcp_get_multilingual_template_path

tcp_get_current_language_iso