q2a/question2answer — pull request #56 by pupi1985 (2014-06-30 07:07:43+00:00)
Title: Removed the need to hardcode language codes by adding metadata to the translations

I noticed that all languages were hardcoded and, in order to add a new language (such as es-AR for Spanish-Argentina), there was a need to modify the core. So I thought of making the language detection dynamic, based on metadata added for each language.

Of course, this means each language will have to add this new file containing the metadata which results in updating all language packs. Anyway, I believe in the long turn this will result in less work and a more flexible platform.

This also has another advantage that could be adding even more metadata, such as the download URL of the language pack, the version (which does not necessarily have to match the Q2A version) or why not a Github repo for the language pack.

Taking this a step further, probably plugins and themes should also have their metadata stored in a separate file and avoid the current comment parsing.