{"id":27117,"library":"locales","title":"locales","description":"A Python module for multilingual solutions, providing locale detection and translation utilities. Version 0.0.2 (released 2023-11-23). Low release cadence, no updates since initial release.","status":"active","version":"0.0.2","language":"python","source_language":"en","source_url":"https://github.com/vffuunnyy/Locales","tags":["locale","i18n","l10n","multilingual"],"install":[{"cmd":"pip install locales","lang":"bash","label":"Default install"}],"dependencies":[],"imports":[{"note":"No known common mistakes; ensure no naming conflict with standard library 'locale'.","symbol":"get_locale","correct":"from locales import get_locale"},{"note":"Same as above.","symbol":"set_locale","correct":"from locales import set_locale"}],"quickstart":{"code":"from locales import get_locale, set_locale\n\n# Set locale (e.g., 'en_US')\nset_locale('en_US')\n\n# Get current locale\ncurrent = get_locale()\nprint(current)  # e.g., 'en_US'\n","lang":"python","description":"Basic usage: set and get the current locale."},"warnings":[{"fix":"Use 'from locales import ...' and avoid naming your file locale.py.","message":"The 'locales' package (v0.0.2) is very minimal and may not be actively maintained. It might conflict with the standard library module 'locale'. Ensure your code imports from the correct package.","severity":"gotcha","affected_versions":"all"},{"fix":"Evaluate alternative libraries like Babel (babel.pocoo.org) for production multilingual needs.","message":"No official documentation or detailed README; functionality is unclear beyond basic locale get/set. May lack support for full CLDR locale data or pluralization.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install locales' to install the PyPI package, or use 'import locale' for the standard library.","cause":"Package not installed or mistakenly referring to standard library.","error":"ModuleNotFoundError: No module named 'locales'"},{"fix":"Ensure you have version 0.0.2 installed (pip install --upgrade locales) and use 'from locales import get_locale'.","cause":"Using an older version or incorrect import path.","error":"AttributeError: module 'locales' has no attribute 'get_locale'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}