Login Retreive lost passwordRegister
Search

Forum Index / General / UTF-8 and language detect

[ This topic is solved ]

  kreatik 31 March 14 / 10:42  
Hello,

Here is a patch to use the UTF-8 version of a language file if the language detection is enabled.

File class.FormHandler.php at line 1944, replace with :
<?php
// set the language which formhandler supports
                
while (list (, $l) = each ($aLang))
                {
                                        
$lFilename null;
                                        
// check if the language file exists in UTF-8
                                        
if (file_exists(FH_INCLUDE_DIR 'language/' strtolower($l) . '-utf8.php')) {
                                            
$lFilename $l '-utf8';
                                        }
                                        
// check if the language file exists
                                        
elseif (file_exists(FH_INCLUDE_DIR 'language/' strtolower($l) . '.php')) {
                                            
$lFilename $l;
                                        }
                                        if (!
is_null($lFilename)) {
                                            
// set the language
                                            
$this->setLanguage($lFilename);
                                            
$bSet true;
                                            break;
                                        }
                                }
?>

  kreatik 31 March 14 / 10:52  
Changed at 31 March 14 / 10:52
Here a link for the latest version of french language file (UTF-8) : http://uploaded.net/file/xa9rnen6

  Johan Wiegel (Admin) 07 April 14 / 12:21  
Thanks for sharing this.

I made a new version and published this today.

  Top


powered by PHP-GLOBE   © 2004 - 2024 FormHandler. All rights reserved.   -   Open source license