Welcome Guest, Not a member yet? Register   Sign In
Will language files slow down my application?
#1

[eluser]KeyStroke[/eluser]
I'm using language files for internationalization. While my multi-language content is stored in a database, most static contents are translated using language files with a bunch of $this->lang->line() requests in the Views.

Will this affect my application's performance in any way?


Thanks
#2

[eluser]xwero[/eluser]
Of course it will affect your performance if you compare it to static content. If you want a faster view rendering you can make your view files language pendent.
Code:
// en_home.php
<h1>Welcome</h1>
// nl_home.php
<h1>Welkom</h1>
The language segment of the url defines the view file that need to be called. The downside of this method is you have to repeat yourself. If there are changes you have to make them in all language files.

So it's up to you to decide what is more important; faster rendering or maintainability.
#3

[eluser]KeyStroke[/eluser]
Great suggestion xwero. I don't know why I haven't thought of this before. For this particular project, your method will work better.

Thanks Smile




Theme © iAndrew 2016 - Forum software by © MyBB