I am planning to start with my android app localization sytem, I want runtime language changes so I am planning to go for:
English identifiers STATUSBAR_USERNAME_TEXT
XML data storage
Event manager approach to update values.
I don’t have doubts about the last one, but with the others I am not sure if should be better to use a non-human-friendly guid for identifiers and JSON structure for the data storage. The idea of the guid identifier is to avoid duplication, and to reuse resources without losing context (imagine I need the text “username” again on a different place, using the above example is contextually incorrect. the identifier can be changed but it looks not correct either to go modifying identifiers) About JSON storage, XML is more verbose and ends using more disk space (sometimes 10 times more.) but is more readable.
Are not critical things but just wanna hear your opinions.
As far as identifiers goes. I usually go for a simple name approach unless there is a specific reason not too, for example if a name could be used multiple times. Though those situations are fairly rare in my experience.
Is there a reason you want to use a formalized data structure? The dumbest solutions I’ve seen (dumb not as in bad but as in simple) are literally a separate file for each supported language that is parsed by splitting new lines and then equals into a Dictionary<string, string>.
If you’re really concerned about repetitive phrases then you could come up with a system to apply a GUID to phrases that are the same but have different IDs but I don’t know that it’s really worth it honestly.
In terms of file size I would imagine it’s largely irrelevant unless you’re storing a ton of phrases.
I definitely agree with @KelsoMRK that you should use the simplest format that meets your needs.
However, that said, use CSV. Translators almost universally use spreadsheets, and usually it’s MS Excel. A simple, reliable workflow is critical since translation work will go back and forth several times as you add new content to be translated, add new languages, receive corrections, etc. CSV is easy to parse, and it works with all spreadsheet software.