SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 06/01/2019, 06:59 PM   #1
Mr.Anonymous
Gangsta
 
Mr.Anonymous's Avatar
 
Join Date: Jul 2011
Location: Every ban list
Posts: 889
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, 05:14 AM   #2
ozm8ey
Big Clucker
 
ozm8ey's Avatar
 
Join Date: Jan 2014
Posts: 178
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 community website: Click here
ozm8ey is offline   Reply With Quote
Old 07/01/2019, 05:28 AM   #3
X337
Gangsta
 
Join Date: Sep 2014
Location: Indonesia
Posts: 880
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, 02:36 PM   #4
BlackyX
Little Clucker
 
BlackyX's Avatar
 
Join Date: Dec 2018
Posts: 29
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, 03:32 PM   #5
K0P
Gangsta
 
K0P's Avatar
 
Join Date: Nov 2015
Location: *.*.*.*
Posts: 600
Reputation: 84
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.

Not a CSGO beggar!
K0P is offline   Reply With Quote
Old 11/01/2019, 10:20 PM   #6
BlackBank
High-roller
 
Join Date: Dec 2010
Location: The Netherlands
Posts: 1,191
Reputation: 435
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
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 01:55 PM
What is the best website to buy a VPS? Trenico Server Support 7 12/02/2014 06:57 PM
Website (hosting website) Sanady Everything and Nothing 6 27/07/2012 10:48 PM
Do you want a website? TheLazySloth Everything and Nothing 11 04/12/2011 04:18 AM
Send data to website, website puts data into Database DeathOnaStick Help Archive 9 27/08/2010 02:34 PM


All times are GMT. The time now is 02:42 PM.


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