Announcement

#1 2021-11-14 02:15:27

mountwilson
Member
Zwischen den Meeren
2017-07-10
17

language problems

Hi!

On a Firefox installation I saw this error:

Code:

Notice: Undefined index: day in /www/htdocs/v084591/pwo/include/functions.inc.php on line 758

This was triggered because "intl.accept_languages" in the config of firefox was set to "en_EN" which forced piwigo to not start with my default language (German) but in English language.

However common.lang.php for English language is incomplete (E.g. $lang['day'] is missing).

I solved it be resetting "intl.accept_languages" to it's default value which is "de, en-US, en" for me.

But, I'd suggest to include a more complete common.lang.php for English language too.

BTW. What would happen if "intl.accept_languages" was set to a language that isn't installed with piwigo at all?


Thanks for reading, mountwilson

Offline

 

#2 2021-11-14 12:50:12

erAck
Only trying to help
2015-09-06
1340

Re: language problems

Might be that is a collision of two things,

1) your setting of "en_EN" if that really was meant to be the case and not just a typo, because actually correct values would be "en-gb" or "en-us" or just "en" (also note '-' hyphen minus instead of '_' underscore), country code "EN" isn't even defined in ISO 3166-1.

2) Piwigo has some odd notion of English language files, the default is the language/en_UK/common.lang.php which in itself is already wrong because en_UK is odd, Great Britain is GB (and there is no "UK" country code defined either, though it's reserved). But that file does contain the $lang['day'][.] definitions.
And language/en_GB/common.lang.php and language/en_US/common.lang.php contain $lang_info['parent']= "en_UK"; so that should be fine.. but maybe a fallback (due to the en_EN vs en_UK oddness?) kicks in too late.

@plg would have to tell..

Fwiw, I use en-GB or en-US (depending on browser instance) as default content language in the browser and do not encounter such notice in the Piwigo PHP log.

Setting the browser content language to something exotic that Piwigo doesn't have, it should fall back to the default English. Well, you could try ;)


Running Piwigo at https://erack.net/gallery/

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2022 · Contact