• [MOD] Language select 4 0 5 1
Currently:  

Author Topic: [MOD] Language select  (Read 296251 times)

0 Members and 1 Guest are viewing this topic.

Offline MEXX

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: [MOD] Language select
« Reply #90 on: January 29, 2006, 07:09:31 PM »
кодировка в lang/russian/main.php в переменной $lang['charset'] правильная?
в header.html таг {charset} есть?
Кодировка в lang/russian/main.php в переменной $lang['charset'] стоит "windows-1251".
В браузере стоит Кирилица (Windows). Когда меняю язык с русского на английский, то кодировка меняется на Западноевропейскую(ISO).
Меняю обратно вручную- все нормально. Но при переходе на другую страницу- опять иероглифы :(
В header.html тага {charset} нет. :(
   

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Language select
« Reply #91 on: January 29, 2006, 07:54:50 PM »
В header.html тага {charset} нет. :(
В этом и проблема. Проблема решена.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline MEXX

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: [MOD] Language select
« Reply #92 on: January 29, 2006, 11:54:56 PM »
В header.html тага {charset} нет. :(
В этом и проблема. Проблема решена.
Может проблема не в этом? Пробовал по разному. Просто копировал:
<meta http-equiv="content-type" content="text/html; charset={charset}" />
И полностью менял файл header.html. Все без изменений.  :|
   

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Language select
« Reply #93 on: January 30, 2006, 12:26:07 AM »
И полностью менял файл header.html. Все без изменений.  :|
я конечно извиняюсь, но я не верю :P
Надеюсь проверяли не в Опере...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline MEXX

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: [MOD] Language select
« Reply #94 on: January 30, 2006, 09:50:06 AM »
я конечно извиняюсь, но я не верю :P
Надеюсь проверяли не в Опере...
Нет, проверял не в Опере. Для себя еще раз проверил и поменял файл header на оригинал. Все равно ничего не дает.
Русский язык отображается иероглифами пока вручную не поменяешь кодировку. :(
   

Offline bibabobu

  • Sr. Member
  • ****
  • Posts: 311
  • Technische und künstlerische Gravuren
    • View Profile
    • Technische und künstlerische Gravuren für die gesamte Metall-, Kunststoff- und Papierindustrie
Re: [MOD] Language select
« Reply #95 on: March 16, 2006, 12:46:14 AM »
@vano

Thanks for the great language selection Mod.  I think it is working great on my site.

But now I am trying to validate my site.
Please have a short look according with my w3c validation link at the bottom of my site. On home.html i have no mistakes and  i received the validation.
Going on with validation on other pages for example the anfahrt.html i receive errors by trying to get the validation.
I cannot find the mistakes in the code.
Please could you have a look at this. Because these mistakes are also on other pages where i put in the {lang_select} code.
I am really confused :cry:


Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Language select
« Reply #96 on: March 16, 2006, 12:55:51 AM »
sorry, I have no knowlege about w3c standarts...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: [MOD] Language select
« Reply #97 on: March 16, 2006, 01:00:05 AM »
try to replace &l with &amp;l

Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline bibabobu

  • Sr. Member
  • ****
  • Posts: 311
  • Technische und künstlerische Gravuren
    • View Profile
    • Technische und künstlerische Gravuren für die gesamte Metall-, Kunststoff- und Papierindustrie
Re: [MOD] Language select
« Reply #98 on: March 16, 2006, 07:24:29 AM »
In which file?  I think in the page-header. Right?

Offline Optimum

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: [MOD] Language select
« Reply #99 on: March 24, 2006, 11:27:47 AM »
Hi,

how can I select the display language?

What I mean is, I have a site in two languages. English and Slovenian. User "selects" the overall language at first visit or by which domain he/she enters my page. So for English I'd like to display the 4images in English, but for Slovenians I'd like to use Slovenian language set (which I already created and works fine). I'm only interested in the 4images "front", not the admin area. That can be in English all the time. I'm actually only using a few files (deleted a bunch of stuff): index, menu, categories, detail and search.
How could I do that?

If it's important: I have a "Gallery" button inside my site, which links to 4images index page. You have to think of my site as two different (separate) sites, not one site with two language sets. Two independent sites, on same server, different domain name, one 4images system.

Please help.

TIA,
Mat

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Language select
« Reply #100 on: March 24, 2006, 02:20:31 PM »
In global.php replace
Code: [Select]
if (isset($HTTP_GET_VARS['l']) || isset($HTTP_POST_VARS['l'])) {with:
Code: [Select]
if (!defined('IN_CP') && (isset($HTTP_GET_VARS['l']) || isset($HTTP_POST_VARS['l']))) {
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Optimum

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: [MOD] Language select
« Reply #101 on: March 24, 2006, 03:05:36 PM »
Hi V@no..

thx for helping me again..

ok, I did that.. Hmm.. now what?
How can I "call" English language from English site and Slovenian language from Slovenian site?

TIA!
Mat

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Language select
« Reply #102 on: March 24, 2006, 03:16:21 PM »
Now, I'm confused, as I undertstood your question, you wanted ACP stay in same language, while the rest of the site can have two langauges...
what is the question? just adding to the url l=your language is not enough?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Optimum

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: [MOD] Language select
« Reply #103 on: March 24, 2006, 03:16:48 PM »
With the  "?l=slovenian" or "?l=english" right?

I told you, I'm a total newbie when it comes to php, but I learn fast :)

Pls confirm that it's the right way.


As usual, THANKS A LOT!!

Regards,
Mat


EDIT: Sorry, you replied while I typed. Yeah, it works great! Thanks. I'm a newbie at php and I didn't know the "?l=language" adition to the url, sorry..  :oops:

Thanks!!

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Language select
« Reply #104 on: March 24, 2006, 03:18:30 PM »
yes, thats all you need add l=language to the url ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)