2
// ================================================
3
// SPAW PHP WYSIWYG editor control
4
// ================================================
6
// ================================================
7
// Developed: Alan Mendelevich, alan@solmetra.lt
8
// Copyright: Solmetra (c)2003 All rights reserved.
9
// ------------------------------------------------
11
// ================================================
13
// ================================================
20
function setLang($value)
29
// variable to hold current language block
32
function setBlock($value)
34
$this->block = $value;
41
// charset for the current language
46
return $this->charset;
49
// text direction for the current language
59
// default language data
60
var $default_lang_data;
63
function SPAW_Lang($lang = '')
65
global $spaw_default_lang;
68
$this->lang = $spaw_default_lang;
82
global $spaw_default_lang;
84
@include($spaw_root.'lib/lang/'.$this->lang.'/'.$this->lang.'_lang_data.inc.php');
85
$this->charset = $spaw_lang_charset;
86
if (!empty($spaw_lang_direction)) $this->dir = $spaw_lang_direction;
87
$this->lang_data = $spaw_lang_data;
88
unset($spaw_lang_data);
89
@include($spaw_root.'lib/lang/'.$spaw_default_lang.'/'.$spaw_default_lang.'_lang_data.inc.php');
90
$this->default_lang_data = $spaw_lang_data;
94
function showMessage($message, $block='')
96
$_block = ($block == '')?$this->block:$block;
97
if (!empty($this->lang_data[$_block][$message]))
100
return $this->lang_data[$_block][$message];
104
// if message is not present in current language data
105
// return message from default language
106
return (isset($this->default_lang_data[$_block][$message])?$this->default_lang_data[$_block][$message]:'');
110
// shortcut for showMessage
111
function m($message, $block='')
113
return $this->showMessage($message, $block);
116
// sets the root point for the data
117
function setRoot($block = '')
119
// if no block passed -> reload data
127
$this->lang_data = $this->lang_data[$block];
128
$this->default_lang_data = $this->default_lang_data[$block];
b'\\ No newline at end of file'