i am working to create a multilang Application, and i want to read the "array" from file, i don t know from where to start.
My english.lang looks like:
LOGIN_TITLE = Test login
LOGIN_CREATE_ACC_LABEL = Create an account
LOGIN_REMEMBER_ME_CHECKBOX = Remember Me
LOGIN_AUTO_LOGIN = Auto Login
LOGIN_STATUS_WELCOME = Welcome to Client
LOGIN_STATUS_WRONG = Invalid username or password
LOGIN_SING_IN_BUTTON = Sing In
And i am looking for smth like:
string = getLang("LOGIN_TITLE");
I have an ideea about how to do, but is not optimal, i am thinking to do smth like: read from file line by line up to line who contains "LOGIN_TITLE" and then replace "LOGIN_TITLE = " with blank, and the remains should be "Test login", the string i needed
I think it will have low performance if my lang file is too big.
Do you have any ideea about how to do that?