-
-
Notifications
You must be signed in to change notification settings - Fork 305
Open
Labels
questionFurther information is requestedFurther information is requested
Description
I would like to customize the Current KR (soon to be KO) i18n completely.
However, there doesn't seem to be a way provide a custom language translation.
import * as v from 'valibot';
// Import every translation for a specific language
import '@valibot/i18n/kr'; // since I don't want this
v.setGlobalConfig({ lang: 'kr' }); // I am setting kr as the global
// and setting specific error messages in the Language type
v.setSpecificMessage(v.minLength, (issue) => `Invalid length: ...`, 'en');Is there a way for me to achieve this? A workaround would be fine.
You can use an objects or arrays to define your translations and then use JS code to dynamically call
setSpecificMessagebut this might break tree shaking.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested