vice |
|
---|---|
Поставил Сиену 0.9.4. Нужно мне сделать сайт с тремя языками (анг, рус, нем). вставил в .thaccess ################ Cotonti Handy URLs for Apache ####################### # Below are the rules to be included in your main .htaccess file or httpd.conf # Rewrite engine options Options FollowSymLinks -Indexes RewriteEngine On # Server-relative path to Cotonti. Replace it with your path if you run Cotonti # in a subfolder RewriteBase "/" # Default path and static files protection RewriteRule ^(datas|images|js)/(.*)$ $1/$2 [QSA,NC,NE,L] RewriteRule ^(.*)\.(css|js|gif|jpg|png|ico)$ $1.$2 [QSA,NC,NE,L] # Language selector RewriteRule ^(en|ru|de|nl)/(.*) index.php?rwr=$2&l=$1 [QSA,NC,NE] # Protect standard .php URLs RewriteRule ^([a-z]+)\.php(.*)$ $1.php$2 [QSA,NC,NE,L] # Admin area and message are special scripts RewriteRule ^admin/([a-z0-9]+) admin.php?m=$1 [QSA,NC,NE,L] RewriteRule ^(admin|login|message)(/|\?|$) $1.php [QSA,NC,NE,L] # All the rest goes through standard rewrite gateway RewriteRule ^([^?]+) index.php?rwr=$1 [QSA,NC,NE,L]Далее создал структуру типа
1 en (English)
1.1 en-articles (Articles)
1.1.1 en-articles-tech (Technical)
1.1.2 en-articles-fiction (Fiction)
1.1.3 en-articles-economy (Economy)
1.2 en-news (News)
1.3 en-goods (Goods)
1.3.1 en-goods-food (Food)
1.3.1.1 en-goods-food-fruits (Fruits)
1.3.1.2 en-goods-food-fast (Fast Food)
1.3.1.3 en-goods-food-cakes (Cakes)
1.3.2 en-goods-computers (Computers)
2 ru (Русский)
2.1 ru-articles (Статьи)
2.1.1 ru-articles-tech (Технические)
2.1.2 ru-articles-fiction (Художественные)
2.1.3 ru-articles-economy (Экономика)
2.2 ru-news (Новости)
2.3 ru-goods (Товары)
2.3.1 ru-goods-food (Еда)
2.3.1.1 ru-goods-food-fruits (Фрукты)
2.3.1.2 ru-goods-food-fast (Фаст-фуд)
2.3.1.3 ru-goods-food-cakes (Пирожные)
2.3.2 ru-goods-computers (Компьютеры)
Дальше в конфигурации добавил папки и локали
en|English
ru|Русский
de|German
Подскажите код селектора для добавления в header для переключения языков.
|