Warning: The author of this contribution does not provide support for it anymore.

Quick Language

Set language in the address - Quick Language

Set language in the address

by MakisH » Sat Aug 16, 2014 7:07 am

I would find useful to be able to change the language directly in the link, using the GET method. For example, something like what now exists in the registration form:

Code: Select all

example.com/ucp.php?mode=register&change_lang=en


The case I have in mind:
In my forum, I use two languages: English and Greek. Almost all the text is written in Greek. I want anyone to be able to use a website translator (like Google Translate) to aproximately translate the posts to English. BUT, Google Translate cannot use the english language pack (not default), as it connects as a guest. This gives a really bad result.

Is it possible to make this change? It would be great! :D
MakisH
Registered User
Posts: 47
Joined: Fri Sep 24, 2010 6:18 pm
Contact:

Re: Set language in the address

by ACherry » Thu Sep 21, 2017 2:41 pm

Easy way:
\ext\alg\quicklanguage\event\listener.php

Code: Select all

$submit = (isset($_POST['h_lang'])) ? true : false;
Replace to:

Code: Select all

$submit = ( (isset($_POST['h_lang']))  OR (isset($_GET['h_lang'])) )  ? true : false;
ACherry
Registered User
Posts: 1
Joined: Thu Sep 21, 2017 2:32 pm
Contact:


cron