I have a little issue with that subject.
Imagine, I need to create a template with some variables:
<div class="main_text">
We would like to tell you that ...blah-blah...
<?php $username ?>
and after that we want to blah blah...
<?php $first_variable ?>
and
<?php $second_variable ?> etc.
<div>
I can see two ways for making this working with different languages:
- Create a template for each language. It is faster, but makes more code.
-
Create language constants in a codeigniter way, for each part of string, like this:
$lang['WE_WOULD_LIKE'] = 'We would like to tell you that ...blah-blah...'; $lang['AND_AFTER_THAT'] = 'and after that we want to blah blah...';
And then populate it while parsing the template. This way is also not the best, too much small constants.
Maybe somebody knows a better way? Please show me the way.