Multi-language support - How to change language in the view? |
(06-30-2019, 04:20 AM)yamahdico Wrote: Thanks for your reply but I'm still having this issue. All the “hard work” should be done in the controller, never in the view. It can be done in a model or library but the final result should be fetched by the controller and passed to the view. If you want to get the same language string in five different languages, you can call setLocale for each languages, get the translated text string and store the result in an array, and then pass this array of text to the view so it can be displayed in the HTML document or used in JavaScript.
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/ |
Messages In This Thread |
Multi-language support - How to change language in the view? - by yamahdico - 05-18-2019, 08:33 AM
RE: Multi-language support - How to change language in the view? - by InsiteFX - 06-01-2019, 03:29 AM
RE: Multi-language support - How to change language in the view? - by yamahdico - 06-30-2019, 04:20 AM
RE: Multi-language support - How to change language in the view? - by includebeer - 07-01-2019, 06:00 AM
RE: Multi-language support - How to change language in the view? - by InsiteFX - 06-30-2019, 03:28 PM
RE: Multi-language support - How to change language in the view? - by yamahdico - 07-01-2019, 06:30 AM
RE: Multi-language support - How to change language in the view? - by kilishan - 07-01-2019, 08:03 AM
|