{locale} placeholder in routes |
(06-09-2022, 01:56 AM)webdeveloper Wrote: One important difference is that your locale have to be placed always on the first place of URL. You're right, I didn't think it could be a problem as all my routes are configured with the locale as the first segment of the URL. (06-09-2022, 01:56 AM)webdeveloper Wrote: Why did you remove second part of locale? This is used in most cases for variants of language e.g. "en-US". I consider this language fallback behaviour as useful I remove the second part of the locale because it doesn't really make a difference. At least not in my case. My blog is in French and in English. So if the locale detected is en-US, en-UK or any other en-xx it redirects to the English version of the blog. Same thing for fr-FR, fr-CA, etc, it goes to the French version. Anything else goes to the default locale, with is English.
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/ |
Messages In This Thread |
{locale} placeholder in routes - by webdeveloper - 06-08-2022, 06:23 AM
RE: {locale} placeholder in routes - by includebeer - 06-08-2022, 03:10 PM
RE: {locale} placeholder in routes - by webdeveloper - 06-09-2022, 01:56 AM
RE: {locale} placeholder in routes - by includebeer - 06-09-2022, 02:44 PM
RE: {locale} placeholder in routes - by InsiteFX - 06-09-2022, 11:57 PM
RE: {locale} placeholder in routes - by includebeer - 06-10-2022, 12:36 PM
RE: {locale} placeholder in routes - by kenjis - 06-10-2022, 06:05 PM
RE: {locale} placeholder in routes - by includebeer - 06-10-2022, 06:34 PM
RE: {locale} placeholder in routes - by webdeveloper - 06-11-2022, 04:29 AM
|