Returns the raw template string for kind in locale (no interpolation).
kind
locale
The returned string still contains the {document} slot for kinds other than "empty". Use getErrorMessage if you want substitution.
{document}
"empty"
One of the ParseError["kind"] values.
ParseError["kind"]
Optional
Target locale. Unsupported values fall back to DEFAULT_LOCALE.
DEFAULT_LOCALE
The raw template string, possibly containing {document}.
import { getErrorTemplate } from "nationid/i18n";getErrorTemplate("too_short", "es"); // "El {document} es demasiado corto."getErrorTemplate("empty", "en"); // "Please enter a value." Copy
import { getErrorTemplate } from "nationid/i18n";getErrorTemplate("too_short", "es"); // "El {document} es demasiado corto."getErrorTemplate("empty", "en"); // "Please enter a value."
Returns the raw template string for
kindinlocale(no interpolation).The returned string still contains the
{document}slot for kinds other than"empty". Use getErrorMessage if you want substitution.