Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Lang

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty 3
View previous topic :: View next topic  
Author Message
Viruzzz
Smarty n00b


Joined: 10 Nov 2009
Posts: 4

PostPosted: Tue Nov 10, 2009 1:32 am    Post subject: Lang Reply with quote

Hello, i need some help with this question:
index.php:
Code:

$_SESSION['strLangue'] = 'en';
$smarty->config_dir = 'includes/lang';


index.tpl:
Code:

{config_load file="`$smarty.session.strLangue`/lang.php"}


lang.php:
Code:

title = "My Title Site"


My site i show me this errors:
Code:

Fatal error: Uncaught exception 'Exception' with message 'Syntax Error in config file "includes/lang/en/lang.php" on line 1 "title = "My Title Site"" - Unexpected ""My Title Site"", expected one of: EOL' in /home/sites/****/public_html/Smarty/sysplugins/smarty_internal_config_file_compiler.php:109 Stack trace: #0 /home/sites/****/public_html/Smarty/sysplugins/smarty_internal_configfileparser.php(1002): Smarty_Internal_Config_File_Compiler->trigger_config_file_error() #1 /home/sites/****/public_html/Smarty/sysplugins/smarty_internal_configfileparser.php(1107): Smarty_Internal_Configfileparser->yy_syntax_error(0, 0) #2 /home/sites/****/public_html/Smarty/sysplugins/smarty_internal_config_file_compiler.php(59): Smarty_Internal_Configfileparser->doParse(0, 0) #3 /home/sites/****/public_html/Smarty/sysplugins/smarty_internal_config.php(206): Smarty_Internal_Config_File_Compiler->compileSource(Object(Smarty_ in /home/sites/****/public_html/Smarty/sysplugins/smarty_internal_config_file_compiler.php on line 109


What is wrong? i use last rev

Please help with this Sad
Back to top
View user's profile Send private message Visit poster's website
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Tue Nov 10, 2009 3:10 pm    Post subject: Reply with quote

Currently the config file parser requires that you have a newline at the end of each definition.
Back to top
View user's profile Send private message
Viruzzz
Smarty n00b


Joined: 10 Nov 2009
Posts: 4

PostPosted: Tue Nov 10, 2009 7:54 pm    Post subject: Reply with quote

U.Tews wrote:
Currently the config file parser requires that you have a newline at the end of each definition.


example pls, i-am new in smarty

thx
Back to top
View user's profile Send private message Visit poster's website
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Tue Nov 10, 2009 8:10 pm    Post subject: Reply with quote

I think your lang.php file did end directly after the " sign. Add a line break at the end of the file.
Back to top
View user's profile Send private message
Viruzzz
Smarty n00b


Joined: 10 Nov 2009
Posts: 4

PostPosted: Tue Nov 10, 2009 8:26 pm    Post subject: Reply with quote

Yes, it really works now

ty Very Happy
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty 3 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP