From c2bfae5465d9cecd1a1af3893f4633cee7451db1 Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Sun, 30 Dec 2007 13:13:01 +0100 Subject: [PATCH] [svn r14083] Added language file import method --- main/webrooms/checksession.php | 3 +- main/webrooms/get_translation.lib.php | 59 +++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 main/webrooms/get_translation.lib.php diff --git a/main/webrooms/checksession.php b/main/webrooms/checksession.php index 4c8b317a53..f0b5a89b87 100644 --- a/main/webrooms/checksession.php +++ b/main/webrooms/checksession.php @@ -10,6 +10,7 @@ require_once('../newscorm/scorm.class.php'); require_once('../newscorm/scormItem.class.php'); require_once('../newscorm/aicc.class.php'); require_once('../newscorm/aiccItem.class.php'); +require_once('get_translation.lib.php'); include("../../main/inc/global.inc.php"); api_block_anonymous_users(); @@ -72,7 +73,7 @@ printf(' %s',$student_view); printf(' %s',$document_id); printf(''); printf(''); -include_once($language_interface.'.xml'); +printf(get_language_file_as_xml($language_interface)); printf(''); printf(''); ?> \ No newline at end of file diff --git a/main/webrooms/get_translation.lib.php b/main/webrooms/get_translation.lib.php new file mode 100644 index 0000000000..6eae15ccf4 --- /dev/null +++ b/main/webrooms/get_translation.lib.php @@ -0,0 +1,59 @@ +'.$items[1].''.$string.''."\n"; + } + } + } + if(empty($xml) && $language!='english') + { + return get_language_file_as_xml('english'); + } + return $xml; +} +?> \ No newline at end of file