|
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 |
RomanTarasov Smarty Rookie
Joined: 21 Nov 2014 Posts: 6
|
Posted: Sat Nov 29, 2014 10:36 pm Post subject: Using smarty config for translations? performance? |
|
|
I wonder if i should use smarty configs for holding translations for multilingual sites.
In the past i used just plain text files with
var1=value1
var2=value2
var3=value3
that i parsed file for language i need with PHP and got translations array.
I think its much cleaner to use smarty configs for this, however am i losing something in terms of performance from using smarty configs instead of plain text files?
Also if config holds like 4000 variables for translation will this be slower than same in plan text file? |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Mon Dec 01, 2014 1:11 am Post subject: |
|
|
Not gonna work. For obvious resons. Normal, quality translation is rarely a mere string replacement.
Though, to be absolutely precise,something like this is possible, but this is not a question of performance. |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Tue Dec 02, 2014 3:12 pm Post subject: |
|
|
AnrDaemon wrote: | Not gonna work. For obvious resons. Normal, quality translation is rarely a mere string replacement.
Though, to be absolutely precise,something like this is possible, but this is not a question of performance. |
Config files are parsed into PHP, so they should be much faster than scanning text files. I'd recommend running a benchmark and see for yourself. |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Wed Dec 03, 2014 6:45 am Post subject: |
|
|
Either way, it'll end up in cache, and you WILL be caching pages, if your enterprise runs into performance concerns. |
|
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
|