mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 12:09:51 +02:00
feat: string hooks
This commit is contained in:
1 parent
f5f3f70e35
commit
27abf1b0de
7 files changed
+82
-12
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { fetchPB } from "@blitzkit/core";
|
||||
import type { Strings } from "@blitzkit/i18n";
|
||||
import { Avatars } from "../../protos/avatars";
|
||||
import { AbstractAPI } from "./abstract";
|
||||
|
||||
@@ -29,4 +30,11 @@ export class ClientAPI extends AbstractAPI {
|
||||
|
||||
return strings;
|
||||
}
|
||||
|
||||
protected async _strings(locale: string) {
|
||||
const response = await fetch(`/api/strings/${locale}.json`);
|
||||
const json = (await response.json()) as Strings;
|
||||
|
||||
return json;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user