Minimalist Semantic Markup

Welcome Guest
Please Login or Register

If you have registered but not recieved your activation e-mail in a reasonable amount of time, or have issues with using the registration form, please use our Contact Form for assistance. Include both your username and the e-mail you tried to register with.

Author Topic: Getting language from URL  (Read 806 times)


  • Junior Member
  • *
  • Posts: 23
  • Karma: +2/-0
Getting language from URL
« on: 1 Dec 2020, 08:11:02 pm »
The "Lang" class already implemented to make a multi-language website, but there is nothing to get user language from URL.

Jason Knight, as you said before:
As to the language thing, I'd probably put the language AFTER the page name, and use "Friendly URI's" to make extracting what pages people are trying to view easier.
so I assume we should expect something like this:[or for short: "en"]

Then it seems to me, it should be the "Request" class job to parse user language and maybe set it by Settings class and then remove it from the $data exists in the Request class.

Jason Knight

  • Administrator
  • Hero Member
  • *****
  • Posts: 844
  • Karma: +159/-1
    • CutCodeDown -- Minimalist Semantic Markup
Re: Getting language from URL
« Reply #1 on: 2 Dec 2020, 06:43:36 pm »
The lang handler as currently coded is meant for site-wise use from the user.ini.php, however changing the language would/should be handled by the user account, probably as one of the extra dynamic parameters (not yet configured) or by adding it to the user table.

It's not something I'd generally hardcode into uri's, but again I wouldn't keep multiple installations of the same language CONTENT on the same website. As I've said many the time, I've only ever seen that end in tears with a mis-mash of multilanguage content that annoys not just the folks managing it, but also the people using the visitors.

Multi-language of that depth is ALWAYS a bad idea.
I'll fix every flaw, I'll break every law, I'll tear up the rulebook if that's what it takes. You will see, I will crush this cold machine.


SMF spam blocked by CleanTalk