Skip to content
This repository has been archived by the owner on Jun 10, 2023. It is now read-only.

Commit

Permalink
more lang stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
spookybear0 committed Oct 6, 2020
1 parent 9f84206 commit dc44525
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@
__author__ = "RealistikDash"

default_config = {
"port" : 69,
"port" : 80,
"sql_server" : "localhost",
"sql_user" : "root",
"sql_db" : "realistikosu",
"sql_db" : "gdpys",
"sql_password" : "",
"debug" : False,
"level_path" : "data/levels/",
"save_path" : "data/saves/",
"command_prefix" : "/",
"command_prefix" : "!",
"default_priv" : 30,
"cache_level_strs" : True
"cache_level_strs" : True,
"lang" : "en"
}

user_config = {}
Expand Down
6 changes: 3 additions & 3 deletions handlers/lang.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import json
import os
from config import user_config

class Lang:
def __init__(self, lang):
def __init__(self):
for f in os.listdir("lang"):
if f == lang + ".json":
if f == user_config["lang"] + ".json":
lang = json.load(open("lang/" + f, "r"))
for key, value in lang.items():
setattr(self, key, value)

lang = Lang()

0 comments on commit dc44525

Please sign in to comment.