tessl install tessl/npm-i18next-client@1.11.0DEPRECATED client-side JavaScript internationalization library with translation, pluralization, and localization support.
Agent Success
Agent success rate when using this tile
69%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.08x
Baseline
Agent success rate without this tile
64%
Build a product price display system that formats prices and dates according to different locales using an internationalization library.
The system should:
@generates
/**
* Initialize the product display system with a specific locale
* @param {string} locale - The locale to use (e.g., 'en-US', 'de-DE', 'ja-JP')
* @returns {Promise<void>}
*/
async function initializeDisplay(locale);
/**
* Format a price with currency for the current locale
* @param {number} amount - The price amount
* @param {string} currency - Currency code (e.g., 'USD', 'EUR', 'JPY')
* @returns {string} Formatted price string
*/
function formatPrice(amount, currency);
/**
* Format a date for the current locale
* @param {Date} date - The date to format
* @returns {string} Formatted date string
*/
function formatDate(date);
/**
* Format relative time (e.g., "2 days ago")
* @param {Date} date - The date to compare to now
* @returns {string} Relative time string
*/
function formatRelativeTime(date);
/**
* Format a large number with locale-appropriate separators
* @param {number} value - The number to format
* @returns {string} Formatted number string
*/
function formatNumber(value);Provides internationalization and localization support with built-in formatting capabilities.