PEAK XOOPS - emlh: open site in the first visit in a specific language? in englishin japanese

emlh: open site in the first visit in a specific language?

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 | Posted on 2006/9/2 7:20
irmtfan  »°Åù·³Áâ   Posts: 96
how to do it?
i want force people to see english version in the first visit.
i search in forum but dont find any similar
Votes:3 Average:10.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/9/5 13:01
GIJOE  ÀèǤ·³Áâ   Posts: 4110
It depends on the order in configuration of EMLH.

eg) fr -> en
// list the language tags separated with comma
define('EASIESTML_LANGS','fr,en');

// list the language images separated with comma
define('EASIESTML_LANGIMAGES','images/french.gif,images/english.gif');

// list the language names separated with comma
define('EASIESTML_LANGNAMES','french,english');

// list language - accept_chaset patterns (perl regex) separated with comma
define('EASIESTML_ACCEPT_CHARSET_REGEXES',',');

// list language - accept_language patterns (perl regex) separated with comma
define('EASIESTML_ACCEPT_LANGUAGE_REGEXES','/^fr/,/^en/');

// charset in Content-Type separated with comma (only for fastestcache)
define('EASIESTML_CHARSETS','ISO-8859-1,ISO8859-1');

Or modify the pattern of EASIESTML_ACCEPT_CHARSET_REGEXES / EASIESTML_ACCEPT_LANGUAGE_REGEXES.

Votes:2 Average:10.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/9/5 18:41
irmtfan  »°Åù·³Áâ   Posts: 96
sorry but i dont understand it.

<?php
/*** THE EASIEST MULTILANGUAGE HACK  by GIJOE  ***/

// CONFIGURATIONS BEGIN

// list the language tags separated with comma
//define('EASIESTML_LANGS','xlang:en,xlang:ja'); // This is a sample of long pattern against tag misunderstanding 
define('EASIESTML_LANGS','en,fa'); // [en]english[/en]  [ja]japananese[/ja] common

// list the language images separated with comma
define('EASIESTML_LANGIMAGES','modules/xlanguage/images/english.gif,modules/xlanguage/images/iran.gif');

// list the language names separated with comma
define('EASIESTML_LANGNAMES','english,persian');

// list language - accept_chaset patterns (perl regex) separated with comma
define('EASIESTML_ACCEPT_CHARSET_REGEXES',',/shift_jis/i');

// list language - accept_language patterns (perl regex) separated with comma
define('EASIESTML_ACCEPT_LANGUAGE_REGEXES','/^en/,/^fa/');

// charset in Content-Type separated with comma (only for fastestcache)
define('EASIESTML_CHARSETS','utf-8,utf-8');

// tag name for language image  (default in englishin japanese. don't include specialchars)
define('EASIESTML_IMAGETAG','mlimg');

// make regular expression which disallows language tags to cross it
define('EASIESTML_NEVERCROSSREGEX','/\<\/table\>/');

// the life time of language selection stored in cookie
define('EASIESTML_COOKIELIFETIME',365*86400);
i put this but still my site open in persian not english.
Votes:2 Average:10.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/9/6 5:27
GIJOE  ÀèǤ·³Áâ   Posts: 4110
1st, remove cookie on your site.
2nd, modify ACCEPT_*_REGEXES patterns.
Votes:2 Average:10.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/9/6 12:04
irmtfan  »°Åù·³Áâ   Posts: 96
Quote:
1st, remove cookie on your site.
you mean about fch? i disable it but still it open in persian
Quote:
2nd, modify ACCEPT_*_REGEXES patterns.
modify it to show what?
i dont know what change is needed for these 2 lines.

Votes:2 Average:10.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/9/7 4:54
GIJOE  ÀèǤ·³Áâ   Posts: 4110
Can hit anyway in 1st option ...

// list language - accept_chaset patterns (perl regex) separated with comma
define('EASIESTML_ACCEPT_CHARSET_REGEXES','/.*/,');

// list language - accept_language patterns (perl regex) separated with comma
define('EASIESTML_ACCEPT_LANGUAGE_REGEXES','/.*/,');
Votes:3 Average:10.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/9/7 13:54
irmtfan  »°Åù·³Áâ   Posts: 96
Thank you man
it seems change of these lines like you wrote resolve pages in english.

i dont know much about regular expression.
why this is not work?

/.*/,/.*/
Votes:2 Average:10.00
Previous post - Next post | Parent - No child | Posted on 2006/9/8 4:34
GIJOE  ÀèǤ·³Áâ   Posts: 4110
Learn regular expression in the other site
Votes:3 Average:10.00

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!