diff --git a/app/music_on_hold/app_languages.php b/app/music_on_hold/app_languages.php new file mode 100644 index 0000000000..ad51ca9b69 --- /dev/null +++ b/app/music_on_hold/app_languages.php @@ -0,0 +1,53 @@ + + Portions created by the Initial Developer are Copyright (C) 2008-2012 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane + James Rose +*/ + + + $text['label-moh']['en-us'] = 'Music on Hold'; + $text['desc-moh']['en-us'] = "Music on hold can be in WAV or MP3 format. To play an MP3 file you must have mod_shout enabled on the 'Modules' tab. You can adjust the volume of the MP3 audio from the 'Settings' tab. For best performance upload 16 bit, 8/16/32/48 kHz mono WAV files."; + $text['label-upload-moh']['en-us'] = 'Upload Music'; + $text['label-file-path']['en-us'] = 'File Path'; + $text['button-clear']['en-us'] = 'Clear'; + $text['label-sampling']['en-us'] = 'Sampling'; + $text['label-category']['en-us'] = 'Category'; + $text['opt-default']['en-us'] = 'Default'; + $text['opt-new']['en-us'] = 'New...'; + $text['message-click-select']['en-us'] = 'Double-Click to Select an Existing Category'; + $text['button-upload']['en-us'] = 'Upload'; + $text['message-available-to-all']['en-us'] = 'Available to All Domains'; + $text['label-download']['en-us'] = 'Download'; + $text['label-play']['en-us'] = 'Play'; + $text['label-uploaded']['en-us'] = 'Uploaded'; + $text['label-file-size']['en-us'] = 'File Size'; + $text['label-sampling']['en-us'] = 'Sampling'; + $text['message-delete']['en-us'] = 'Do you really want to delete this file?'; + $text['message-nofiles']['en-us'] = 'No files found.'; + $text['label-delete-category']['en-us'] = 'Delete Category'; + $text['label-location']['en-us'] = 'Location'; + $text['label-default']['en-us'] = 'Default'; + $text['message-event-socket']['en-us'] = 'Connection to Event Socket failed.'; + +?> \ No newline at end of file diff --git a/app/music_on_hold/music_on_hold.php b/app/music_on_hold/music_on_hold.php index e661e3f910..5ca9799493 100644 --- a/app/music_on_hold/music_on_hold.php +++ b/app/music_on_hold/music_on_hold.php @@ -22,6 +22,7 @@ Contributor(s): Mark J Crane + James Rose */ include "root.php"; @@ -35,6 +36,12 @@ else { exit; } +//add multi-lingual support + require_once "app_languages.php"; + foreach($text as $key => $value) { + $text[$key] = $value[$_SESSION['domain']['language']['code']]; + } + require_once "includes/paging.php"; $sampling_rate_dirs = Array(8000, 16000, 32000, 48000); @@ -230,10 +237,8 @@ if ($_GET['act'] == "del" && permission_exists('music_on_hold_delete')) { echo " \n"; echo " \n"; echo "

\n"; - echo " Music on Hold

\n"; - echo " Music on hold can be in WAV or MP3 format. To play an MP3 file you must have\n"; - echo " mod_shout enabled on the 'Modules' tab. You can adjust the volume of the MP3\n"; - echo " audio from the 'Settings' tab. For best performance upload 16 bit, 8/16/32/48 kHz mono WAV files.\n"; + echo " ".$text['label-moh']."

\n"; + echo " ".$text['desc-moh']."\n"; echo "

\n"; echo " \n"; echo " \n"; @@ -244,17 +249,17 @@ if ($_GET['act'] == "del" && permission_exists('music_on_hold_delete')) { //show the upload form if (permission_exists('music_on_hold_add')) { - echo "Upload Music\n"; + echo "".$text['label-upload-moh']."\n"; echo "

\n"; echo "
\n"; echo "\n"; echo "\n"; echo " \n"; echo " \n"; - echo " \n"; - echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "
\n"; - echo " File Path
\n"; - echo " \n"; + echo " ".$text['label-file-path']."
\n"; + echo " \n"; echo "
Sampling
\n"; + echo "
".$text['label-sampling']."
\n"; echo " \n"; echo "
Category
\n"; + echo "
".$text['label-category']."
\n"; echo " \n"; echo " "; echo "
 
\n"; - echo " "; + echo " "; echo "
 
\n"; - echo " \n"; + echo " \n"; echo "
\n"; @@ -316,19 +321,19 @@ if ($_GET['act'] == "del" && permission_exists('music_on_hold_delete')) { //show the default category if (permission_exists('music_on_hold_default_view')) { - echo "Default\n"; + echo "".$text['label-default']."\n"; if (count($_SESSION['domains']) > 1) { - echo "  - Available to All Domains\n"; + echo "  - ".$text['message-available-to-all']."\n"; } echo "

\n"; echo "\n"; echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; echo " \n"; echo " "; @@ -366,7 +371,7 @@ if ($_GET['act'] == "del" && permission_exists('music_on_hold_delete')) { } if ($v_path_show) { - echo "
Location: ".$music_on_hold_dir."
\n"; + echo "
".$text['label-location'].": ".$music_on_hold_dir."
\n"; } echo "

\n"; @@ -378,11 +383,11 @@ if ($_GET['act'] == "del" && permission_exists('music_on_hold_delete')) { echo "

\n"; echo "
DownloadPlayUploadedFile SizeSampling".$text['label-download']."".$text['label-play']."".$text['label-uploaded']."".$text['label-file-size']."".$text['label-sampling']."
\n"; echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; echo " \n"; echo " "; @@ -409,7 +414,7 @@ if ($_GET['act'] == "del" && permission_exists('music_on_hold_delete')) { echo " \n"; echo " \n"; echo "\n"; @@ -425,8 +430,8 @@ if ($_GET['act'] == "del" && permission_exists('music_on_hold_delete')) { if (!$moh_found) { echo "\n"; echo " \n"; echo "\n"; } diff --git a/app/music_on_hold/resources/classes/switch_music_on_hold.php b/app/music_on_hold/resources/classes/switch_music_on_hold.php index f78fa6560b..f0d6edfa9c 100644 --- a/app/music_on_hold/resources/classes/switch_music_on_hold.php +++ b/app/music_on_hold/resources/classes/switch_music_on_hold.php @@ -22,6 +22,7 @@ Contributor(s): Mark J Crane + James Rose */ include "root.php"; @@ -55,7 +56,7 @@ include "root.php"; //start the select $select = ""; $select .= "
DownloadPlayUploadedFile SizeSampling".$text['label-download']."".$text['label-play']."".$text['label-uploaded']."".$text['label-file-size']."".$text['label-sampling']."
".($sampling_rate_dir / 1000)." kHz\n"; if (permission_exists('music_on_hold_delete')) { - echo " $v_link_label_delete\n"; + echo " $v_link_label_delete\n"; } echo "
\n"; - echo " No files found."; - echo " \n"; + echo " ".$text['message-nofiles'].""; + echo " \n"; echo "