In many web app projects, I have to be able to manage different languages environments :
The application language (defined by the user).
The resource language (defined by content).
My application is designed to launch HMVC requests to fetch the resources. The problem is that these sub-requests should be performed in the resource language and not the application one. So that, for instance, the use of Lang::get('key') returns the translation in the resource language.
As a possible way to achieve that, Harro Verton suggested :
" to push the current language on the stack when you start an HMVC request, and pop it again when the request returns.
This would allow you to set a different language in your HMVC request, load files if needed, without having an impact on the language set in the parent request."
I think that developing such capability could be a good point for Fuel language "awareness".
In many web app projects, I have to be able to manage different languages environments :
My application is designed to launch HMVC requests to fetch the resources. The problem is that these sub-requests should be performed in the resource language and not the application one. So that, for instance, the use of Lang::get('key') returns the translation in the resource language.
As a possible way to achieve that, Harro Verton suggested : " to push the current language on the stack when you start an HMVC request, and pop it again when the request returns. This would allow you to set a different language in your HMVC request, load files if needed, without having an impact on the language set in the parent request."
I think that developing such capability could be a good point for Fuel language "awareness".
More details and basic exemple in discussion : http://fuelphp.com/forums/topics/view/10851#11039
Thanks for reading