Fix template

* Fix override template variables from theme language file. Optimize
method.