UNPKG

jquery-formatcurrency

Version:

This is a continuation / enhancement to [Ben Dewey's plugin with the same name](https://code.google.com/p/jquery-formatcurrency/). Most of the work is his', I've just added a few features and options, and fixed some small issues, so at least most credits

91 lines (79 loc) 2.38 kB
// This file is part of the jQuery formatCurrency Plugin. // // The jQuery formatCurrency Plugin is free software: you can redistribute it // and/or modify it under the terms of the GNU Lesser General Public License as published // by the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // The jQuery formatCurrency Plugin is distributed in the hope that it will // be useful, but WITHOUT ANY WARRANTY; without even the implied warranty // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License along with // the jQuery formatCurrency Plugin. If not, see <http://www.gnu.org/licenses/>. (function ($) { $.formatCurrency.regions['de'] = { symbol: '€', positiveFormat: '%n %s', negativeFormat: '-%n %s', decimalSymbol: ',', digitGroupSymbol: '.', groupDigits: true }; $.formatCurrency.regions['en-IN'] = { symbol: 'Rs.', positiveFormat: '%s %n', negativeFormat: '%s -%n', decimalSymbol: '.', digitGroupSymbol: ',', groupDigits: true }; $.formatCurrency.regions['es'] = { symbol: '€', positiveFormat: '%n %s', negativeFormat: '-%n %s', decimalSymbol: ',', digitGroupSymbol: '.', groupDigits: true }; $.formatCurrency.regions['fr'] = { symbol: '€', positiveFormat: '%n %s', negativeFormat: '-%n %s', decimalSymbol: ',', digitGroupSymbol: ' ', groupDigits: true }; $.formatCurrency.regions['it'] = { symbol: '€', positiveFormat: '%s %n', negativeFormat: '-%s %n', decimalSymbol: ',', digitGroupSymbol: '.', groupDigits: true }; $.formatCurrency.regions['ja'] = { symbol: '¥', positiveFormat: '%s%n', negativeFormat: '-%s%n', decimalSymbol: '.', digitGroupSymbol: ',', groupDigits: true }; $.formatCurrency.regions['zh'] = { symbol: '¥', positiveFormat: '%s%n', negativeFormat: '%s-%n', decimalSymbol: '.', digitGroupSymbol: ',', groupDigits: true }; $.formatCurrency.regions['nl'] = { symbol: '€', positiveFormat: '%s %n', negativeFormat: '%s -%n', decimalSymbol: ',', digitGroupSymbol: '.', groupDigits: true }; })(jQuery);