Contributing to LocaleDB
LocaleDB is an open-source project and we love contributions from developers worldwide!
Ways to Contribute
1. Fix or Update Country Data
If you notice incorrect locale data for a country:
- Fork the GitHub repository
- Edit the country JSON file in
/data/countries/ - Verify your changes against official sources (CLDR, local standards)
- Submit a Pull Request with a clear description
2. Add a New Country
To add a country not yet in LocaleDB:
- Use an existing country JSON as a template
- Create
/data/countries/XX.json(XX = ISO alpha-2 code) - Fill in all required fields using CLDR data
- Update
/data/_index.jsonwith the new country - Submit a Pull Request
3. Improve the Website
Help us make LocaleDB better by:
- Improving UI/UX
- Adding search functionality
- Creating comparison tools
- Writing better documentation
- Fixing bugs
Data Schema
Each country JSON file follows a strict TypeScript schema defined in /src/types/country.ts. Key sections:
basics- Country name, capital, coordinates, flagcodes- ISO 3166, BCP47, IOC, FIFA codescurrency- Symbol, position, separators, patternsdateTime- Date/time formats, month/day names, timezonesnumberFormat- Decimal/thousands separators, groupingphone- Calling code, format, number lengthsaddressFormat- Postal code format, address line orderlocale- Writing direction, measurement system, paper size
Data Sources to Reference
When adding or updating data, use these authoritative sources:
- CLDR (Unicode Common Locale Data Repository)
- mledoze/countries GitHub Repository
- National standards organizations (e.g., TSE for Turkey, ANSI for USA)
- Official government websites for postal codes and formats
Pull Request Guidelines
- One change per PR - Don't mix data updates with code changes
- Clear commit messages - "Update Turkish currency format" not "fix data"
- Reference sources - Link to CLDR or official documentation
- Test locally - Run
pnpm devand verify changes - Validate JSON - Ensure proper formatting and schema compliance
Code of Conduct
We're committed to fostering a welcoming community. Be respectful, constructive, and collaborative. Harassment or toxic behavior will not be tolerated.
Questions?
Open a GitHub Discussion if you need help or have questions about contributing.
Ready to contribute?
Visit our GitHub repository to get started.