'------------------------------------------
'changes:Changed in v1.52 to support multipline text. The text has to be formated differently
#Rem
'summery:This method loads the localization class via a string
'The format of the string has to be (key%;%LanguageShortCut1%:%Translation1%;%...):
'Play%;%DE%:%Spielen
'Options%;%DE%:%Optionen
'Help%;%DE%:%Hilfe
'MultiLine%;%DE%:%Dieser Text%LF%erscheint in 2 Zeilen
#End
Method LoadFromString:Void(locStr:String)
'Local lines := locStr.Split(String.FromChar(10))
Local lines := locStr.Split("~n")
For Local line:= Eachin lines
If line = "" Then Continue
'Local ct$[] = line.Split(";")
Local ct$[] = line.Split("%;%")
Local keyStr:String = ct[0].ToLower()
For Local i:Int = 2 To ct.Length()
'Local valStr$[] = ct[i-1].Split(":")
Local valStr$[] = ct[i-1].Split("%:%")
Local lang:String = valStr[0].ToLower()
Local value:String = valStr[1]
value = value.Replace("%LF%","~n")
Self.strMap.Set(lang+keyStr,value)
Next
Next
#Rem
For Local item := Eachin Self.strMap
Print item.Key()
Print item.Value()
Next
Print("---------------------")
#End
End