[eluser]JulianM[/eluser]
Hi,
I would like to know your opinion about what are the best practices to write anchors in an application that uses custom routes.
Mostly of my applications are multi-language. For example, imagine a simple master/detail application. You need to link from a List to each detail view with id=27.
English: /product/27
Spanish: /producto/27
So, I have a route from /producto (in Spanish) to /product controller in English.
But at the time I write anchors in the master view to link to each detail view, I would like to use the right language.
For example:
<?php echo anchor('product/27') ?> when I am in English language
<?php echo anchor('producto/27') ?> when I am in Spanish language
What do you think is the best approach to specify the anchors?
Should I use a helper that render the right route each time?
Thanks.
Julian