Detailed Description
Class provides language dependent substitutions for strings.
- Author
- Dodonov A.A.
Definition at line 26 of file lang_view.php.
Constructor & Destructor Documentation
Constructor.
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 55 of file lang_view.php.
{
try
{
$this->CachedMultyFS =
get_package(
'cached_multy_fs' ,
'last' , __FILE__ );
$this->Lang =
get_package(
'lang' ,
'last' , __FILE__ );
}
catch( Exception $e )
{
}
}
Member Function Documentation
| set_locale_form |
( |
|
$Options | ) |
|
Function draws change language fom.
- Parameters
-
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 98 of file lang_view.php.
{
try
{
$LangList = $this->Lang->get_list_of_languages();
$Form = $this->CachedMultyFS->get_template( __FILE__ , 'lang_form.tpl' );
$this->Output = $Form;
foreach( $LangList as
$Lang )
{
$LangFlag = $Lang === $this->Lang->get_locale() ? 'active' : 'inactive';
$Template = $this->CachedMultyFS->get_template( __FILE__ , $LangFlag.'_lang.tpl' );
$Template = str_replace( '{client_lang}' , $Lang , $Template );
$this->Output = str_replace( '{lang_list}' , "$Template{lang_list}" , $this->Output );
}
}
catch( Exception $e )
{
}
}
Component's view.
- Parameters
-
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 141 of file lang_view.php.
{
try
{
if( $Options->get_setting( 'lang_file' , false ) )
{
$ComponentHTML = '{lang_file:'.$Options->get_all_settings().'}';
$Changed = false;
$ComponentHTML = $this->LangMarkup->compile_lang_file( $Options );
return( '' );
}
$ContextSet =
get_package(
'gui::context_set' ,
'last' , __FILE__ );
$ContextSet->add_context( dirname( __FILE__ ).'/conf/cfcx_set_locale_form' );
if( $ContextSet->execute( $Options , $this ) )return( $this->Output );
}
catch( Exception $e )
{
}
}
Field Documentation
Cached packages.
- Author
- Dodonov A.A.
Definition at line 38 of file lang_view.php.
HTML code of the component.
- Author
- Dodonov A.A.
Definition at line 78 of file lang_view.php.
The documentation for this class was generated from the following file: