I’m trying to read a java multiline i18n properties file. Having lines like:
messages.welcome=Hello\
World!
messages.bye=bye
Using this code:
import configobj
properties = configobj.ConfigObj(propertyFileName)
But with multilines values it fails.
Any suggestions?
According to the ConfigObj documentation,
configobjrequires you to surround multiline values in triple quotes:If modifying the properties file is out of the question, I suggest using configparser:
Here’s a quick proof of concept:
Output: