Answer the question
In order to leave comments, you need to log in
Add multilingualism to an existing site?
There is a site. Language versions are implemented by copying the engine to a folder with the name of the language (ru, ua, kz, etc...) The main version is English, located in the root. I didn't do it.
Now the task has become to get rid of this method, i. there should be only one engine in the root of the site. But the language versions should remain at the same links: site.com/ru/ site.com/ua/ site.com/kz/ etc… The
CNC on the site is implemented through the .htaccess file, example:
RewriteRule ^blog/?$ index.php?module=BlogView [L,QSA]
Answer the question
In order to leave comments, you need to log in
Write an application plugin and, at the stage before routing, put an action that will set the desired language and convert links to a common form.
CNC on the site is implemented through the .htaccess file, exampleThis was clearly a bad idea.
Scatter languages into subdomains:
en. site.ru, de. site.ru, etc.
Then all .htaccess settings will work as before, and you will already define the language in the rules by %{HTTP_HOST} . For example like this:
RewriteCond %{HTTP_HOST} (en|de|fr).site.ru
RewriteRule ^(.*)$ %1%/
smarti supports loading configs
in the config, you can load sets of constants to
implement the choice of the config through a known language
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question