[Slim-Checkins] r11809 - in /branches/6.5/server: Slim/Utils/Strings.pm strings.txt

mherger at svn.slimdevices.com mherger at svn.slimdevices.com
Tue Apr 24 16:22:48 PDT 2007


Author: mherger
Date: Tue Apr 24 16:22:48 2007
New Revision: 11809

URL: http://svn.slimdevices.com?rev=11809&view=rev
Log:
Bug: 2726, 4678
Description: fix locale for date/time display

Modified:
    branches/6.5/server/Slim/Utils/Strings.pm
    branches/6.5/server/strings.txt

Modified: branches/6.5/server/Slim/Utils/Strings.pm
URL: http://svn.slimdevices.com/branches/6.5/server/Slim/Utils/Strings.pm?rev=11809&r1=11808&r2=11809&view=diff
==============================================================================
--- branches/6.5/server/Slim/Utils/Strings.pm (original)
+++ branches/6.5/server/Slim/Utils/Strings.pm Tue Apr 24 16:22:48 2007
@@ -32,6 +32,7 @@
 # we export string() so it's less typing to use it
 our @EXPORT_OK = qw(string);
 
+use POSIX qw(setlocale LC_TIME);
 use File::Spec::Functions qw(:ALL);
 
 use Slim::Utils::Misc;
@@ -72,6 +73,11 @@
 	for my $lang (keys(%languages)) {
 		$languages{$lang} = languageName($lang);
 	}
+
+	my $locale = string('LOCALE' . (Slim::Utils::OSDetect::OS() eq 'win' ? '_WIN' : '') );
+	$locale .= Slim::Utils::Unicode::currentLocale() =~ /utf8/i ? '.UTF-8' : '';
+
+	setlocale( LC_TIME, $locale );
 
 	return 1;
 }

Modified: branches/6.5/server/strings.txt
URL: http://svn.slimdevices.com/branches/6.5/server/strings.txt?rev=11809&r1=11808&r2=11809&view=diff
==============================================================================
--- branches/6.5/server/strings.txt (original)
+++ branches/6.5/server/strings.txt Tue Apr 24 16:22:48 2007
@@ -43,6 +43,36 @@
 	PT	Escolha um idioma
 	SV	Välj språk
 	ZH_CN	请选择语言
+
+LOCALE_WIN
+	CS	cz
+	DA	dan
+	DE	deu
+	EN	en
+	ES	sp
+	FI	fin
+	FR	fra
+	IT	ita
+	NL	nld
+	NO	nor
+	SV	sve
+
+LOCALE
+	CS	cs_CZ
+	DA	da_DK
+	DE	de_DE
+	EN	en_US
+	ES	es_ES
+	FI	fi_FI
+	FR	fr_FR
+	HE	he_IL
+	IT	it_IT
+	JA	ja_JP
+	NL	nl_NL
+	NO	no_NO
+	PT	pt_PT
+	SV	sv_SE
+	ZH_CN	zh_CN
 
 BASE_SKIN
 	CS	Světlý



More information about the checkins mailing list