Multilingual restaurant menu domain library: menu item management, language pack registry, and localised price formatting
Project description
menu-translator-nci
Domain library for the Multilingual Restaurant Menu Management Platform. Encapsulates the core entities of a restaurant menu system — dishes, language packs, and localised pricing — in three independent modules with no external dependencies.
Modules
MenuItemManager
Validates and manages dish records with categories, allergens, prices, and description.
from menu_translator import MenuItemManager
mgr = MenuItemManager()
dish = mgr.create_dish(
name="Margherita Pizza",
description="Classic tomato, mozzarella, fresh basil",
price=12.50,
category="Main",
allergens=["gluten", "dairy"],
)
LanguagePack
Registry of supported display languages with ISO 639-1 codes, native names, and RTL flags. Used by both the backend (for validating translation targets) and the frontend (for building the language switcher).
from menu_translator import LanguagePack
langs = LanguagePack()
langs.list_supported() # ['en', 'es', 'fr', 'de', 'it', 'hi', 'zh', 'ar']
langs.get_native_name("hi") # 'हिन्दी'
langs.is_rtl("ar") # True
PriceFormatter
Formats prices for display in the correct currency and locale without requiring the full babel package.
from menu_translator import PriceFormatter
fmt = PriceFormatter()
fmt.format(12.5, currency="EUR") # '€12.50'
fmt.format(850, currency="INR") # '₹850.00'
fmt.format(12.0, currency="USD", locale="en_US") # '$12.00'
Installation
pip install menu-translator-nci
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters