0
I have a Codeigniter Project that will be in two languages, however I need to allow this language change only in the project URL;
That is, when accessing domain.com.br/pt it should keep as base url /pt on all pages and consecutively the same thing with /en;
Has anyone ever needed to make this inclusion? Below is the code of my . htaccess, config and constants:
Htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteCond %{HTTP_HOST} ^www\.(.*)
#RewriteRule (.*) http://%1/$1 [R=301,L]
RewriteBase /cliente/em_desenvolvimento/back/mauricio/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</ifModule>
Config:
$config['base_url'] = 'http://192.168.110.4/cliente/em_desenvolvimento/back/mauricio/';
Constants:
define('PATH_FRONT_END', $_SERVER['DOCUMENT_ROOT'] . '/cliente/em_desenvolvimento/back/mauricio/');
define('PATH_FRONT_END_UPLOAD', $_SERVER['DOCUMENT_ROOT'] . 'cliente/em_desenvolvimento/back/mauricio/web_files/uploads/');
I believe something can be accomplished in Routes, but I have no idea how it can be done.
It is not better to work with session?
– ShutUpMagda
Not because I used the language system equal to the following answer: https://answall.com/questions/155683/site-multilinguagem-codeigniter/155708#155708 and Facebook search engines do not create session or cookie and where I have the fields with name_pt, isname_ and does not take the information when sharing the post in some external link.
– Maurício Krüger