set {_index} to convert string uncolored {_message} to lowercase
replace all "-" and ":" and "'" and """" and "." and " " and "[" and "]" and "," and "!" and "?" and "*" and "^" and "%%" and "##" and "@" and "(" and ")" and "_" and "+" and "=" and "`" and "~" and "$" and "|" and "{" and "}" and "<" and ">" with "" in {_index}
#detect if the message hasn't been added to YAML file, if so, auto add it!
#one little issue about this, it results into double value check for current language, but I think optimizing that would be simply pointless (much less clean code)
yaml value "%{_index}%" from "lang%loop-value-2%" is not set:
set yaml value "%{_index}%" from "lang%loop-value-2%" to "%{_message}%"
#save the message to memory + CSV file that gets auto-loaded into memory on server startup (maybe I'll save this to mysql instead for future)
set {langmsg::%{_lang}%::%{_message}%} to {_message}
#if yaml value is present, but it is not loaded into memory, load it!
else:
set {langmsg::%{_lang}%::%{_message}%} to yaml value "%{_index}%" from "lang%{_lang}%"
#since INDEX generation in my yaml files may not be always unique if the messages are extremely similar, but only with differing color codes, this unused code checks for index duplication
#set {_msgc} to yaml value "%{_index}%" from "langEN"
#{_msgc} is not {_message}:
#send "LANGUAGE: %{_msgc}%&2 does not equal to &r%{_message}%&2 | this might be a bug of different colorcodes." to ops and console
#log "LANGUAGE: %{_msgc}% does not equal to %{_message}% | this might be a bug of different colorcodes." to "language-errors.log"