Skip to content

Instantly share code, notes, and snippets.

@alvinl
Created April 24, 2014 01:43
Show Gist options
  • Save alvinl/11238687 to your computer and use it in GitHub Desktop.
Save alvinl/11238687 to your computer and use it in GitHub Desktop.
function GetCurrencyCode( currencyId )
{
switch( currencyId )
{
case 1:
return 'USD';
case 2:
return 'GBP';
case 3:
return 'EUR';
case 5:
return 'RUB';
case 7:
return 'BRL';
default:
return 'Unknown';
}
}
function GetCurrencySymbol( currencyCode )
{
switch( currencyCode )
{
case 'EUR':
return '€';
case 'GBP':
return '£';
case 'USD':
return '$';
case 'RUB':
return 'pуб.';
case 'BRL':
return 'R$';
default:
return currencyCode + ' ';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment