diff Lib/IMPL/Resources/StringLocaleMap.pm @ 379:a471e8b77544

sync
author cin
date Thu, 16 Jan 2014 18:10:50 +0400
parents 2eed076cb944
children 1eca08048ba9
line wrap: on
line diff
--- a/Lib/IMPL/Resources/StringLocaleMap.pm	Wed Jan 15 17:20:54 2014 +0400
+++ b/Lib/IMPL/Resources/StringLocaleMap.pm	Thu Jan 16 18:10:50 2014 +0400
@@ -58,9 +58,21 @@
 sub LoadMap {
 	my ($this,$locale,$default) = @_;
 	
+	my @spec = split /_/, $locale;
+	
+	my @locales;
+	
+	do {
+		push @locales, join('_', @spec);
+	} while(pop @spec);
+	
 	my $file = first { -f } map {
-		my $name = FS->catfile($_,$locale,$this->name);
-		("$name.s", "$name.p");
+		my $path = $_;
+		
+		map {
+			my $name = FS->catfile($path,$_,$this->name);
+			("$name.s", "$name.p");
+		} @locales;
 	} $this->paths;
 	
 	if($file) {