you can not remove block addlanguage but you can modify it in way similar to this
if os.path.exist(language file path ):
addlanguage
he doesn't want to remove the whole addLanguage function, he simply should remove calls to it...
just remove lines with self.addLanguage("some language",...)
be very careful with indentation
This modification for /components/language.py
no need to remove self.addlanguage libe for each unused language
just replace the current unmodified language.py by the attached one and remove unused languages from /usr/share/enigma2/po
original routine
def addLanguage(self, name, lang, country):
try:
self.lang[str(lang + "_" + country)] = ((name, lang, country))
self.langlist.append(str(lang + "_" + country))
except:
print "Language " + str(name) + " not found"
modified routine
def addLanguage(self, name, lang, country):
langpath="/usr/share/enigma2/po/"
try:
if os.path.exists(langpath+lang):
self.lang[str(lang + "_" + country)] = ((_(name), lang, country))
self.langlist.append(str(lang + "_" + country))
except:
print "Language " + str(name) + " not found"
Edited by mfaraj57, 29 October 2012 - 05:54.