-
2006-11-09
joho
I'd like to have a raw local setting (to be used with PHP:s locale functions) in the various lang.php-files. For Sweden, I want all dates to follow the Swedish date format, this includes the abbreviated weekdays and months in dates, so I'd want to use sv_SE in my translation for example.
If this is already possible in the core of DokuWiki (without installing a plug-in), I must not have been able to find it in my searches.
-
2006-11-13
ChrisS
Can you use or derive the value from $conf['lang']?
-
2006-11-15
joho
Not really; it only contains half the information.
$conf['lang'] as used by DokuWiki only handles the language part, it doesn't deal with the locale at all.
Attempting to set $conf['lang'] to "sv_SE" (which it should be for a proper Swedish Language and Swedish Locale setting), makes DW do all sorts of things.
To maintain backwards compatibility, I would recommend that one either uses
$conf['lang']['full'] = 'sv_SE';
or introduce a new setting:
$conf['locale'] = 'sv_SE';
-
2006-11-15
joho
(makes DW do all sorts of things means "generate errors/crash", I was doing something else in my head while finishing that sentence, sorry)
-
2006-11-15
andi
Setting locales isn't too trivial because the locale names are platform dependent. We once had locales for language files but dropped them when we switched to UTF-8 - there still is some magic locale guesser function in inc/common.php. But if you want to set a locale your self simply add the following in your conf/local.protected.php:
setlocale(LC_ALL,'sv_SE');
-
2006-11-18
andi
please use work around posted in comment