scenario
I want to manage a multi language site without using any add-ons. I’m successful in managing all content from single channel, single field set & single template by using conditional statements. I’m able to switch between two languages (English & Arabic).
Now i want URL structure like http://example.com/language_parameter/channel_name/module_name/param1/param2/param3
I failed to place language variable before channel name. I tried to alter htaccess file and few other hacks in core files but i couldn’t make the URL structure. Please guide me to achieve the desired URL structure
I’ve used stash to share variables (current language chosen) across templates and write conditional statements to decide what to show.
my .htaccess is
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Removes index.php from ExpressionEngine URLs
#RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
#RewriteCond %{REQUEST_URI} !/system/.* [NC]
#RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]
# Directs all EE web requests through the site index file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /ee_file/index.php/en|ar/$1 [L]
</IfModule>
Now
http://localhost:81/ee_file/index.php/about is able to retrieve {home_video}
{exp:channel:entries channel="home" limit="1"}
<iframe src="{home_video}" allowfullscreen></iframe>
{/exp:channel:entries}
where as http://localhost:81/ee_file/index.php/en/about is not able to retrieve home's variable
I couldn't figure out how to use template routes in placing language variable before channel name in url.
domain.tld
anden.domain.tld
; or different TLDs for every language.