Author Topic: Language Selecton for Users  (Read 3553 times)

winndd5

  • Newbie
  • *
  • Posts: 2
Re: Language Selecton for Users
« Reply #15 on: September 21, 2009, 08:59:59 AM »
I've made the additions and changes as suggested in this thread.  However, when I click on the flag to change the language, the message: "item could not be found or has been deleted".

It looks like there is a file called "language.php" file exists somewhere in the site?  If there is, I cannot locate it. 

Any help is greatly appreciated.

Site: http://lynnmike.com

sbcjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6247
    • PHPmotion Mods
Re: Language Selecton for Users
« Reply #16 on: September 21, 2009, 01:04:32 PM »
I've made the additions and changes as suggested in this thread.  However, when I click on the flag to change the language, the message: "item could not be found or has been deleted".

It looks like there is a file called "language.php" file exists somewhere in the site?  If there is, I cannot locate it. 

Any help is greatly appreciated.

Site: http://lynnmike.com

The default language file is lang/english.php.

zo2008

  • Jr. Member
  • **
  • Posts: 148
Re: Language Selecton for Users
« Reply #17 on: October 11, 2009, 06:56:04 AM »
How can i make the arabic language file work? or langauge which is not based on english language characters.?
I have converted the english.php in to arabic but the file is not working, do i need to mention any code to allow arabic characters in template?
« Last Edit: October 11, 2009, 07:14:12 AM by zo2008 »

NL-Extreme

  • Sr. Member
  • ****
  • Posts: 170
Re: Language Selecton for Users
« Reply #18 on: October 11, 2009, 09:27:21 AM »
arabic is not possible.
that is becouse of de " ore the Ë you can only use letters and numbers in the file.

the arabic language got a lot of signs that are not accepted by the basecode.

itialian got the same problem only smaller  ;D.


tvdeyen

  • Newbie
  • *
  • Posts: 5
Re: Language Selecton for Users
« Reply #19 on: December 21, 2009, 05:46:25 PM »
Nice script. Thanks!

I have a fix for it. The header function does not allow any whitespaces. So the script does not return to the previous page and displays an empty white page in stead. The line in your script should be:

header("Location:$config[site_base_url]");

without the whitespace after "Location:"

Maybe you should update your script.  ;)

Regards

alikab

  • Jr. Member
  • **
  • Posts: 120
Re: Language Selecton for Users
« Reply #20 on: January 24, 2010, 12:24:02 PM »
what am doing wrong:

1) I have upload deutsch.php and english.php into /lang folder
2) I put the following code into /classes/config.inc.php

Quote
//User language selection
($_SESSION['user_lang'] != '')? $config['language'] = $_SESSION['user_lang'] : NULL;

 3) I uploaded the following language.php in the root of my site

Quote
<?php

include_once ('classes/config.php');
include_once ('classes/sessions.php');


switch($_GET['lang']){

case 'deutsch':
$_SESSION['user_lang'] = 'deutsch';
break;


default:
$_SESSION['user_lang'] = 'english';
break;

}

header("Location:$config[site_base_url]");
?>

and I put the folloeing url in my mail_1.html

http://www.yourdomain.com/language.php?lang=deutsch

but this dosn''t work for me if i click at the link it is going to the home page with english language.

Please help....



bigbro

  • Newbie
  • *
  • Posts: 82
Re: Language Selecton for Users
« Reply #21 on: February 26, 2010, 09:55:24 AM »
it is strange, but when I switch languages.. sometime I got blank page. On login if language is not english, I always get blank page..
any ideas?