How to redirect URL's ? How to change Language ?

Posted by mariobranco 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
How to redirect URL's ? How to change Language ?
May 14, 2017 02:47AM
Hi !
Looks like i'm having a small problem... the redirect looks like is not working.
How can i type google.com and get redirect to piratebox.lan ?

If my friends type *anywebsite*.com i want them to get redirect to piratebox.lan... how can i do that ?
------
How can i change my language from EN to PT_BR ?
I found the file using PT_BR but can't put that file as the default language on the main webpage.

thx in advance !

Using:
Raspberry Pi B+ AND piratebox_rpi_1.1.3-1-19-03-2017.img



Edited 4 time(s). Last edit at 05/14/2017 03:42PM by mariobranco.
Re: How to redirect URL's ? How to change Language ?
May 14, 2017 05:57AM
Hi,
did you verified that your used only a HTTP:// url instead of HTTPS ?
Google.com have been changed to https per default, which will not work for the redirect. Use something strange like "aaaaa.com". HTTPS is not active and then does not work (because it will confuse the user with an SSL Error message).

The language is dependend from your browser settings. If your primare browser language is english, you get an english page. If it is PT-BR, it should be PT-BR. If that does not work, we need to debug this.

best regards
Matthias
Re: How to redirect URL's ? How to change Language ?
May 14, 2017 03:42PM
Hi Matthias !

Thx for the replay.

I did test with http google.com and it works !

About the language part, i want to force to my native language.

How can i force piratebox to PT_BR ?



Edited 1 time(s). Last edit at 05/14/2017 03:43PM by mariobranco.
Re: How to redirect URL's ? How to change Language ?
May 14, 2017 05:12PM
Hi,
you afaik you can't force it to a specific language... maybe there is an option in the l10n JS library..

But probably your language code is not correctly set in the locales ini. Login to your box and edit the file /opt/piratebox/share/content/locales/locales.ini

Change
Quote

[pt-br]
to
Quote

[pt-BR]

I hope this is the issue

best regards
Matthias