CrazyDoctor 1 year ago
parent
commit
72beee92a0
2 changed files with 4 additions and 2 deletions
  1. 3 1
      dist/server/Server.js
  2. 1 1
      dist/types/server/ServerProperties.d.ts

+ 3 - 1
dist/server/Server.js

@@ -52,7 +52,9 @@ class Server {
     constructor(properties) {
         this.instance = (0, express_1.default)();
         this.port = properties.port;
-        this.i18n = i18n_1.i18nLoader.getInstance().setLocale(properties.locale);
+        this.i18n = i18n_1.i18nLoader.getInstance();
+        if (properties.locale)
+            this.i18n.setLocale(properties.locale);
         this.logger = new logger_1.Logger();
         this.httpHandlers = {};
         this.i18nPath = properties.i18nPath;

+ 1 - 1
dist/types/server/ServerProperties.d.ts

@@ -1,6 +1,6 @@
 type ServerProperties = {
     port: number;
-    locale: string;
+    locale?: string;
     i18nPath?: string;
     middlewaresPath?: string;
     routesPath?: string;