Yvon Steinthal Active Member Licensed User Longtime User Jun 3, 2016 #1 Hello, I am currently translating my app between french and english. I have decided to make a MAP type to store the key in english and the value in french using File.ReadMap from text file. It works when there are no spaces such as: Local=Localisation However if i do : No client=Pas de client My map looks like this: No=client=Pas de client Help? Y.
Hello, I am currently translating my app between french and english. I have decided to make a MAP type to store the key in english and the value in french using File.ReadMap from text file. It works when there are no spaces such as: Local=Localisation However if i do : No client=Pas de client My map looks like this: No=client=Pas de client Help? Y.
DonManfred Expert Licensed User Longtime User Jun 3, 2016 #2 I guess you should go the old-style way. I created a small library and example for a similar issue. Maybe it is of help for you... https://www.b4x.com/android/forum/threads/strings-xml.67290/#post-426102 Upvote 0
I guess you should go the old-style way. I created a small library and example for a similar issue. Maybe it is of help for you... https://www.b4x.com/android/forum/threads/strings-xml.67290/#post-426102
udg Expert Licensed User Longtime User Jun 3, 2016 #3 Hi, it depends on how the Properties file format is defined in java. "The key contains all of the characters in the line starting with the first non-white space character and up to, but not including, the first unescaped '=', ':', or white space character other than a line terminator. All of these key termination characters may be included in the key by escaping them with a preceding backslash character; for example, \:\= would be the two-character key ":=" So, in your case, I guess you should use "No\ client" for the key. udg Upvote 0
Hi, it depends on how the Properties file format is defined in java. "The key contains all of the characters in the line starting with the first non-white space character and up to, but not including, the first unescaped '=', ':', or white space character other than a line terminator. All of these key termination characters may be included in the key by escaping them with a preceding backslash character; for example, \:\= would be the two-character key ":=" So, in your case, I guess you should use "No\ client" for the key. udg
Yvon Steinthal Active Member Licensed User Longtime User Jun 3, 2016 #4 Thanks guys i will check udg's solution as the xml way won't work for my b4i app, trying to save time as im developping an app in b4a and b4i at the same time... Upvote 0
Thanks guys i will check udg's solution as the xml way won't work for my b4i app, trying to save time as im developping an app in b4a and b4i at the same time...
Eme Fibonacci Well-Known Member Licensed User Longtime User Jun 3, 2016 #5 Yvon Steinthal said: Thanks guys i will check udg's solution as the xml way won't work for my b4i app, trying to save time as im developping an app in b4a and b4i at the same time... Click to expand... I' m doing it too. To facilitate the creation of maps file I used excel. Something like that: (Col1) key:-----------(col2) en_us-----------(Col3) es_es helloworld-------------Hello World!------------Hola Mundo! And I created a macro vb to export the keys and texts. Simple but it works. Upvote 0
Yvon Steinthal said: Thanks guys i will check udg's solution as the xml way won't work for my b4i app, trying to save time as im developping an app in b4a and b4i at the same time... Click to expand... I' m doing it too. To facilitate the creation of maps file I used excel. Something like that: (Col1) key:-----------(col2) en_us-----------(Col3) es_es helloworld-------------Hello World!------------Hola Mundo! And I created a macro vb to export the keys and texts. Simple but it works.