-
Currency Conversion:
- Convert prices from one currency to another.
- Supports the following currencies:
- PLN (Polish Zloty)
- USD (US Dollar)
- EUR (Euro)
- JPY (Japanese Yen)
- CHF (Swiss Franc)
- GBP (British Pound)
- CZK (Czech Koruna)
- DKK (Danish Krone)
- TRY (Turkish Lira)
- SEK (Swedish Krona)
- NOK (Norwegian Krone)
-
Exchange Rate Updates:
- Uses real api endpoint (
https://api.exchangerate-api.com/v4/latest/
) to get latest exchange rates - Displays the last updated time for the exchange rate.
- Uses real api endpoint (
-
Weight-Based Price Calculations:
- Calculate price per kilogram for a given weight.
- Calculate price for a specific unit weight (e.g., 250g).
- For example: compare prices in supermarket:
- enter price in PLN
- add weight for 200g in PLN
- converts to kilogram price in EUR
- add weight for 250g in EUR
- converts to 250g price in EUR
-
Localization:
- Automatically detects browser language and switches between English and German.
- Localization data is stored in separate JSON files (
locales/en.json
andlocales/de.json
).
-
Settings Persistence:
- Saves selected source and target currencies in the browser using
localStorage
. - Restores saved settings when the page is reloaded.
- Saves selected source and target currencies in the browser using
-
Responsive Design:
- The application works seamlessly on both desktop and mobile devices.
- Select the current currency and the target currency.
- Enter the price in the current currency.
- (Optional) Add the product's weight and a custom unit weight (e.g., 250g).
- The app will calculate:
- Price in the target currency.
- Price per kilogram (if weight is provided).
- Price for the specified unit in target currency (if unit weight is provided).
- Click the 🔄 button to fetch the latest exchange rates.
Access the app directly from GitHub Pages:
👉 Currency and Weight Converter
- Clone the repository:
git clone https://github.com/leneffets/currency.git
This project is licensed under the MIT License. See the LICENSE file for details.
Feel free to open issues or submit pull requests to improve this project. Your contributions are welcome!