SA-MP Forums

Go Back   SA-MP Forums > Other > Everything and Nothing

Reply
 
Thread Tools Display Modes
Old 06/01/2019, 05:59 PM   #1
Mr.Anonymous
Gangsta
 
Mr.Anonymous's Avatar
 
Join Date: Jul 2011
Location: Every ban list
Posts: 859
Reputation: 182
Question How do you add subdirectories localization to your website?

Hi guys, I'm still learning stuff and need some help. How do you add subdirectories localization to your website? Some websites uses subdirectories for languages for example www.website.com/en/ or www.website.com/fr/. I'm currently using URL parameters for my website which would be www.website.com?lang=en and based on that I fetch data from my database. But I guess just www.website.com/en/ looks way better. So how do it do it? My website is not static so I cannot just create actual subdirectories plus I have over 40 languages/translated data in my database. Any help would be appreciated.
Mr.Anonymous is offline   Reply With Quote
Old 07/01/2019, 04:14 AM   #2
ozm8ey
Big Clucker
 
ozm8ey's Avatar
 
Join Date: Jan 2014
Posts: 183
Reputation: 10
Default Re: How do you add subdirectories localization to your website?

idk if i understand your question correctly but i think you may be looking for clean/friendly urls. For me you just need to edit the apache config and set the AllowOverride All on the directory
__________________
My Website
ozm8ey is offline   Reply With Quote
Old 07/01/2019, 04:28 AM   #3
X337
Gangsta
 
Join Date: Sep 2014
Location: Indonesia
Posts: 879
Reputation: 287
Default Re: How do you add subdirectories localization to your website?

use rewrite feature, here is the tutorial for nginx and apache
__________________
viva la sa-mp
X337 is offline   Reply With Quote
Old 11/01/2019, 01:36 PM   #4
BlackyX
Little Clucker
 
BlackyX's Avatar
 
Join Date: Dec 2018
Posts: 28
Reputation: 4
Default Re: How do you add subdirectories localization to your website?

you could also use subdomains
BlackyX is offline   Reply With Quote
Old 11/01/2019, 02:32 PM   #5
K0P
Gangsta
 
K0P's Avatar
 
Join Date: Nov 2015
Location: *.*.*.*
Posts: 602
Reputation: 87
Default Re: How do you add subdirectories localization to your website?

Make new sub folders using FTP, those folders should be named like 'ru' or 'en' etc, they will contain the versions of site in different languages. (Never tried) Check if it works.
__________________
OptionComment
GitHubAll of the scripts made by me can be found here.
Contact InfoClick here if you want to contact me.
K0P is offline   Reply With Quote
Old 11/01/2019, 09:20 PM   #6
BlackBank
Gangsta
 
Join Date: Dec 2010
Location: The Netherlands
Posts: 508
Reputation: 437
Default Re: How do you add subdirectories localization to your website?

Quote:
Originally Posted by K0P View Post
Make new sub folders using FTP, those folders should be named like 'ru' or 'en' etc, they will contain the versions of site in different languages. (Never tried) Check if it works.
Just no.. Just rewrite the url via nginx or apache(htaccess).
BlackBank is offline   Reply With Quote
Old 26/02/2019, 07:47 AM   #7
MinecraftSeeds
Little Clucker
 
Join Date: Feb 2019
Location: Ireland
Posts: 3
Reputation: 0
Default Re: How do you add subdirectories localization to your website?

Use this tool to do exactly what you want https://www.generateit.net/mod-rewrite/index.php .

Enter in the url you have with the standard query string arguments. It will then give you a form to rewrite that so it looks like a subdirectory. It will give you the code then to add to your .htaccess file.
MinecraftSeeds is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Include] i_loc - Reference-based fast lightweight script localization system IllidanS4 Includes 1 07/10/2017 12:55 PM
What is the best website to buy a VPS? Trenico Server Support 7 12/02/2014 05:57 PM
Website (hosting website) Sanady Everything and Nothing 6 27/07/2012 09:48 PM
Do you want a website? TheLazySloth Everything and Nothing 11 04/12/2011 03:18 AM
Send data to website, website puts data into Database DeathOnaStick Help Archive 8 27/08/2010 01:34 PM


All times are GMT. The time now is 12:05 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.