docs/developer_guide/how_to/add_locale.md
Create a YAML file in src/rendercv/schema/models/locale/other_locales/
touch src/rendercv/schema/models/locale/other_locales/mylanguage.yaml
Add the schema reference and provide translations
# yaml-language-server: $schema=../../../../../../schema.json
locale:
language: mylanguage
last_updated: "Your translation"
month: "Your translation"
months: "Your translation"
year: "Your translation"
years: "Your translation"
present: "Your translation"
month_abbreviations:
- Jan
- Feb
- Mar
- Apr
- May
- Jun
- Jul
- Aug
- Sep
- Oct
- Nov
- Dec
month_names:
- January
- February
- March
- April
- May
- June
- July
- August
- September
- October
- November
- December
Add ISO 639-1 language code to english_locale.py
Edit src/rendercv/schema/models/locale/english_locale.py line 95-108:
return {
"english": "en",
# ... existing languages
"mylanguage": "xx", # Add your two-letter ISO 639-1 code
}[self.language]
Update the JSON Schema
just update-schema
This regenerates schema.json so that editors can provide autocomplete and validation for the new locale. See JSON Schema for details.
Done. Use it:
rendercv new "John Doe" --locale mylanguage