I have a problem with my 0.8 installation.
PN loads all the time the file theme/xxx/lang/deu/global.php, regardless which language is selected.
To be honest, I don't have the newest SVN (I have somthing near before MS02), maybe this bug is allready fixed? But I diden't find it in NOC. Can someone confirm? Should I create a ticket?
Marco
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- internetking created topic »password problem« 25. May
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
- mdee created topic »How to implement returnpage ?« 25. May
- nestormateo responded to »Fillters in Clip« 24. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Multilanguage Bug?
-
- Rank: Developer
- Registered: Jan 04, 2005
- Last visit: Apr 13, 2010
- Posts: 69
-
- Rank: Team Member
- Registered: Mar 18, 2002
- Last visit: Oct 21, 2009
- Posts: 6606
Marco,
I can't be 100% sure as not all bugs make it to a bug report - if one of the dev team sees it then they'll fix it directly rather than creating a bug report and then fixing it (time constraints be primary reason...).
Check if the issue occurs with the latest daily snapshot (not the MS2 download). If the bug still exists then please log it.
While typing i've thought on one possible cause. There is the option to match the language to your browser settings. Check this setting under Administration -> System -> Settings -> Auto detect language from browser settings. By default this is enabled.
-Mark
--
Visit My homepage and Zikula themes. -
- Rank: Developer
- Registered: Jan 04, 2005
- Last visit: Apr 13, 2010
- Posts: 69
Thanks for your fast answer. I just checked. The feature is disabled, but if I change the default language to eng, then theme/xxx/lang/eng/global.php will be loaded.
Unfortunatly, updating to newest NB means a few hours efort, I prefere to wait for RC1. If somebody else with actual SVN could do this this, would be very nice... I hope you don't understanding the wrong way, normaly I always test as best I can... -
- Rank: Developer
- Registered: Jan 04, 2005
- Last visit: Apr 13, 2010
- Posts: 69
I debuged the problem, the fowling code leads to the problem:
Code
function pnThemeLangLoad($script = 'global', $theme = null)
{
$currentlang = pnSessionGetVar('lang');
$language = pnConfigGetVar('language');
if ($theme == null) {
$theme = pnUserGetTheme();
}
// get the theme info
$themeinfo = pnThemeGetInfo(pnThemeGetIDFromName($theme));
$_theme = DataUtil::formatForOS($themeinfo['directory']);
$_cLang = DataUtil::formatForOS($currentlang);
$_lang = DataUtil::formatForOS($language);
$_script = DataUtil::formatForOS($script);
$files = array();
$files[] = WHERE_IS_PERSO.'themes/' . $_theme. '/lang/' . $_cLang . '/' . $_lang . '.php';
$files[] = WHERE_IS_PERSO.'themes/' . $_theme. '/lang/' . $_lang . '/' . $_script . '.php';
$files[] = 'themes/' . $_theme . '/lang/' . $_cLang . '/' . $_script . '.php';
$files[] = 'themes/' . $_theme . '/lang/' . $_lang . '/' . $_script . '.php';
Loader::loadOneFile ($files);
return;
}
After execution, $files contains:
Array ( [0] => themes/snf/lang/fra/deu.php [1] => themes/snf/lang/deu/global.php [2] => themes/snf/lang/fra/global.php [3] => themes/snf/lang/deu/global.php )
If I comment out the two lines:
$files[] = WHERE_IS_PERSO.'themes/' . $_theme. '/lang/' . $_lang . '/' . $_script . '.php';
$files[] = 'themes/' . $_theme . '/lang/' . $_lang . '/' . $_script . '.php';
then it works.
BTW, I updated to the newest pnTheme.php and the problem still exitst.
Hope this is helpfull for the developers.
Marco -
- Rank: Team Member
- Registered: Mar 18, 2002
- Last visit: Oct 21, 2009
- Posts: 6606
Marco,
The first bug is that the wrong variable is used in the first entry of the files array. The last variable in the line should be $_script not $_lang hence trying to load deu.php not global.php.
However the fact that the german language file is loading does not look like a bug to me - merely that your session has your preferred language as german not french. This could be either via the auto language detection,via the switch languages block or via the newlang parameter.
Try adding newlang=fra to a URL or remove your session - this should reset it back to the default of french.
Note the code that you've posted isn't from the latest file where the use of incorrect variable has been fixed.
-Mark
--
Visit My homepage and Zikula themes. -
- Rank: Developer
- Registered: Jan 04, 2005
- Last visit: Apr 13, 2010
- Posts: 69
Quote
Note the code that you've posted isn't from the latest file where the use of incorrect variable has been fixed.
You'r right. Shit, I was sure I copied the newest version. It seams I made somthing wrong. Now it works with the newest version. Sorry for wasting your time.
- Moderated by:
- Support
Users on-line
- 0 users
This list is based on users active over the last 60 minutes.
