CrazyDoctor 1 year ago
parent
commit
ecd6dadab0
1 changed files with 3 additions and 1 deletions
  1. 3 1
      lib/server/Server.ts

+ 3 - 1
lib/server/Server.ts

@@ -30,7 +30,9 @@ class Server {
 	public constructor(properties: ServerProperties) {
 	public constructor(properties: ServerProperties) {
 		this.instance = express();
 		this.instance = express();
 		this.port = properties.port;
 		this.port = properties.port;
-		this.i18n = i18nLoader.getInstance().setLocale(properties.locale);
+		this.i18n = i18nLoader.getInstance();
+		if(properties.locale)
+			this.i18n.setLocale(properties.locale);
 		this.logger = new Logger();
 		this.logger = new Logger();
 		this.httpHandlers = {};
 		this.httpHandlers = {};
 		this.i18nPath = properties.i18nPath;
 		this.i18nPath = properties.i18nPath;