Language switch not working ("solved")

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
User avatar
Crizzo
Translations & International Support Teams Manager
Translations & International Support Teams Manager
Posts: 1289
Joined: Thu Apr 23, 2009 1:20 pm
Location: Germany
Name: Christian
Contact:

Language switch not working ("solved")

Post by Crizzo »

Hi,

I am working on an extension: https://github.com/phpbb-de/phpbb-ext-tou (branch: 3.2.x) and I have one bug, I cannot solve at the moment, ideas welcome.

Bug description:
When the user is on: http://www.example.org/app.php/tou/ because he opens this link or the extensions forces him to open it and agree to the terms, there is on the right top corner a dropdown-menu to select other languages (if there are at least 2 installed). But if you select another language, the page reloads, but the Terms or Privacy do not change.

How to reproduce:
Use a phpBB 3.2.10 or 3.3.1 with at least two languages available. Activate the extension. Don't use the extension's custom ToU or PP. Go back to the board index with a non-founder-account, you are redirected to http://www.example.org/app.php/tou/ and now you can switch the language on the right top corner or go directly to http://www.example.org/app.php/tou/

Probably helpful files
- Template: https://github.com/phpbb-de/phpbb-ext-t ... _body.html
- Controller: https://github.com/phpbb-de/phpbb-ext-t ... r/main.php

Thanks for your help. :)

Kind Regards
Crizzo

Edit:
It looks like that the user language is always overwritten by the UCP language, so only the switch is possible for guests. This fact and the lack of benefits for this function led to the case, that i've removed that feature from the extension.
My extensions for phpBB: crizzo.de
German phpBB Support at www.phpbb.de
User avatar
ViolaF
Registered User
Posts: 1540
Joined: Tue Aug 14, 2012 11:52 pm

Re: Language switch not working ("solved")

Post by ViolaF »

May it helps, even if it's style instead of language :)
https://www.phpbb.de/community/viewtopi ... 5&t=157101
User avatar
3Di
Former Team Member
Posts: 16038
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Language switch not working ("solved")

Post by 3Di »

You probably should have overwritten the user data (options) in the database and then reloaded that page.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
Looking for a specific feature or alternative option? We will rock you! 🚀
Post Reply

Return to “Extension Writers Discussion”