Added Moon flag.
This commit is contained in:
parent
daea16ee8c
commit
9385abed97
3 changed files with 11 additions and 6 deletions
|
@ -295,6 +295,9 @@
|
|||
.flag--wf { background-position: top -264px left -80px; }
|
||||
.flag--ws { background-position: top -264px left -288px; }
|
||||
|
||||
/* Xx */
|
||||
.flag--xm { background-position: top -276px left -192px; }
|
||||
|
||||
/* Yx */
|
||||
.flag--ye { background-position: top -288px left -64px; }
|
||||
.flag--yt { background-position: top -288px left -304px; }
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 84 KiB |
14
utility.php
14
utility.php
|
@ -79,19 +79,21 @@ function byte_symbol(int $bytes, bool $decimal = false, array $symbols = ['', 'K
|
|||
return sprintf("%.2f %s%sB", $bytes, $symbol, $symbol !== '' && !$decimal ? 'i' : '');
|
||||
}
|
||||
|
||||
function get_country_name(string $code): string {
|
||||
switch(strtolower($code)) {
|
||||
function get_country_name(string $code, string $locale = 'en'): string {
|
||||
$code = strtolower($code);
|
||||
switch($code) {
|
||||
case 'xx':
|
||||
return 'Unknown';
|
||||
|
||||
case 'a1':
|
||||
return 'Anonymous Proxy';
|
||||
|
||||
case 'a2':
|
||||
return 'Satellite Provider';
|
||||
|
||||
case 'cn':
|
||||
return 'West Taiwan';
|
||||
case 'xm':
|
||||
return 'The Moon';
|
||||
default:
|
||||
return locale_get_display_region("-{$code}", 'en');
|
||||
return \Locale::getDisplayRegion("-{$code}", $locale);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue