Description
Currently, the BIRTH_DAY_FORMAT function in all translation files uses toLocaleString() without any locale parameters, which relies on browser defaults.
Details
- All language files (including the newly added Hebrew translation) use birthDay.toLocaleString() without parameters
- For proper localization, toLocaleString should include appropriate locale and formatting options
- This would provide consistent and culturally appropriate date formatting across different languages
Example improvement
Instead of:
export const BIRTH_DAY_FORMAT = (birthDay: Temporal.PlainDate) =>
`Birthday: ${birthDay.toLocaleString()}`;
Consider:
export const BIRTH_DAY_FORMAT = (birthDay: Temporal.PlainDate) =>
`Birthday: ${birthDay.toLocaleString('en', { dateStyle: 'long' })}`;
With each translation file using its respective locale code.
Related PR
This issue was identified during the review of #15 (Add Hebrew)
Description
Currently, the BIRTH_DAY_FORMAT function in all translation files uses toLocaleString() without any locale parameters, which relies on browser defaults.
Details
Example improvement
Instead of:
Consider:
With each translation file using its respective locale code.
Related PR
This issue was identified during the review of #15 (Add Hebrew)