|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Viruzzz Smarty n00b
Joined: 10 Nov 2009 Posts: 4
|
Posted: Tue Nov 10, 2009 1:32 am Post subject: Lang |
|
|
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 |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Tue Nov 10, 2009 3:10 pm Post subject: |
|
|
Currently the config file parser requires that you have a newline at the end of each definition. |
|
Back to top |
|
Viruzzz Smarty n00b
Joined: 10 Nov 2009 Posts: 4
|
Posted: Tue Nov 10, 2009 7:54 pm Post subject: |
|
|
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 |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Tue Nov 10, 2009 8:10 pm Post subject: |
|
|
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 |
|
Viruzzz Smarty n00b
Joined: 10 Nov 2009 Posts: 4
|
Posted: Tue Nov 10, 2009 8:26 pm Post subject: |
|
|
Yes, it really works now
ty |
|
Back to top |
|
|
|
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
|