Search

i have different domens, and want to choose language by there.(more diff rules there) i need to create my global $param ($lang), and after that get dimamic xml by that param.

how to create my global $lang? =) i should write a extention? its no problem in a whole block/structure, but i dont know lines how to create my $param =)

As far as I understand you have different domain names for each language your website has content for?

I would probably use the Language Redirect extension as a foundation. This, together with the Multilingual Field extension, will allow you to serve different language content based on a language code in the URL, where the language code is exposed as a parameter as well ($url-language). So http://yoursite.com/no/some-article/ would refer to the norwegian (no) version of a page.

Then you’d add URL rewrite rules to your .htaccess file which maps each domain to different languages. For example to map every request to yoursite.no to the norwegian version you’d have:

RewriteCond %{HTTP_HOST} yoursite\.no
RewriteRule (.+) http://yoursite.com/no/$1 [L]

I’m not sure if this is what you were looking for, but I hope it helps you somehow.

Or you could use the Global Param Loader extension with a rule similar to

return substr($_SERVER['SERVER_NAME'],0,strrpos($_SERVER['SERVER_NAME'],'.'));

thanks for advise

i’ll try to make fr.site.com // ge.site.com // *.site.com

and site.ru =)

get Global Param Loader ext.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details