localizer: localizer is loaded before config is assigned.

This commit is contained in:
Harvir 2014-08-15 00:41:27 +01:00
parent 431732ac5a
commit 8061e23f49
2 changed files with 14 additions and 4 deletions

View file

@ -2,8 +2,13 @@ from panda3d.core import *
import string
import types
language = config.GetString('language', 'english')
checkLanguage = config.GetBool('check-language', 0)
try:
language = config.GetString('language', 'english')
checkLanguage = config.GetBool('check-language', 0)
except NameError:
# __builtin__.config not defined yet.
language = getConfigExpress().GetString('language', 'english')
checkLanguage = getConfigExpress().GetBool('check-language', 0)
def getLanguage():
return language

View file

@ -2,8 +2,13 @@ from panda3d.core import *
import string
import types
language = config.GetString('language', 'english')
checkLanguage = config.GetBool('check-language', 0)
try:
language = config.GetString('language', 'english')
checkLanguage = config.GetBool('check-language', 0)
except NameError:
# __builtin__.config not defined yet.
language = getConfigExpress().GetString('language', 'english')
checkLanguage = getConfigExpress().GetBool('check-language', 0)
def getLanguage():
return language