🧩 Interpolation
Key: test.interpolation
Output: Key "test.interpolation" missing in vi, en, fr languages.
t("test.interpolation", { name: "Hoàng Nam", count: 3 })
⚠️ Typo in variable name
Key: test.var_typo
Output: Key "test.var_typo" missing in vi, en, fr languages.
t("test.var_typo", { nam: "123" })
🚨 Missing key
Key: test.not_exist
Output: Key "test.not_exist" missing in vi, en, fr languages.
t("test.not_exist")
🔢 Plural (1)
Key: test.plural
Output: Key "test.plural" missing in vi, en, fr languages.
t("test.plural", { count: 1 })
🔢 Plural (5)
Key: test.plural
Output: Key "test.plural" missing in vi, en, fr languages.
t("test.plural", { count: 5 })
🗂️ Nested Object Key
Key: test.nested.welcome_back
Output: Key "test.nested.welcome_back" missing in vi, en, fr languages.
t("test.nested.welcome_back", { user: { name: "Nam" } })
🧮 Format function
Key: test.interpolation
Output: Key "test.interpolation" missing in vi, en, fr languages.
t("test.interpolation", { name: "nam", count: 1234 }, {
format: (key, value) => {
if (key === "name") return value.toUpperCase();
if (key === "count") return value.toLocaleString("en-US");
return value;
}
})