function social_content_get_content_type_langcode in Social Content 7
Get the langcode to use for the import.
Parameters
string $content_type: The node content type we are using.
Return value
string Language code
1 call to social_content_get_content_type_langcode()
- social_content_run_import in ./
social_content.module - Run an import for a particular social content type.
File
- ./
social_content.module, line 280 - Social Content module.
Code
function social_content_get_content_type_langcode($content_type) {
// Check if content can be localised
// TODO: We are assuming that if a content type is translatable
// we should always use the current language.
// Language should come from the default that
// the node would have been created in.
if (module_exists('locale') && locale_multilingual_node_type($content_type)) {
global $language_content;
return $language_content->language;
}
return LANGUAGE_NONE;
}