Node-Polyglot: Added method has to interface

This commit is contained in:
daniel
2018-03-29 21:59:19 +02:00
parent 2e3cfeee51
commit 9dbca95dbd
2 changed files with 6 additions and 1 deletions
+2
View File
@@ -38,6 +38,8 @@ declare class Polyglot {
locale(): string;
locale(locale: string): void;
has(phrase: string): boolean;
}
export = Polyglot;
+4 -1
View File
@@ -46,7 +46,10 @@ function translate(): void {
polyglot.t("i_like_to_write_in_language", {
_: "I like to write in %{language}.",
language: "Javascript"
});
});
polyglot.has("hello");
polyglot.has("world");
polyglot.replace({
"hello": "hey",