I’m trying to do something like:
$config['first_link'] = 'lang:pagination_first_link';
$config['prev_link'] = 'lang:pagination_prev_link';
$config['next_link'] = 'lang:pagination_next_link';
$config['last_link'] = 'lang:pagination_last_link';
Is there a simple way to do this ?
This configuration is specific to the Pagination config file, but the question is generic.
You have language folders for that. If you take a look at system/language/english, you can see how CodeIgniter deals with internationalization.
For your example, you would create a file in system/language/english, called pagination.php, for example.
If you wanted to create more languages, you could just create folders for them under system/language. Then you could just load the language file before setting the configurations, and then it’s as easy as writing this:
If you have those pagination configurations inside a config file, not on your controller, I can’t think of an easy to do it, without a bit of a hack. You would have this:
I hope I was able to help.