Notes for developers only
As of 1.6.3, only translations for the language codes and countries listed in file https://github.com/q2a/question2answer/blob/v1.6.3/qa-include/qa-app-admin.php#L69
were able to be added by just creating a directory named the same way as the ISO code listed in that file. For example, if I wanted to add the Spanish translation I just created the directory 'qa-lang/es' and then added the translation files in there.
However, this approach of having hardcoded ISO codes has 2 disadvantages:
It requires maintainance. In order to add a translation for a country with an ISO code not listed, it was needed to add that code in the 'qa-app-admin.php' file and then create the appropriate directory with the same name under 'qa-lang'
It takes time. Newly added translations would have to wait for a new release in order to be in the core and be used without any core file modification
As of 1.7 this has changed into a more dynamic approach. Instead of the core expecting a set of given ISO codes it will get the code from directories under 'qa-lang'. That means, if there is a directory named 'qa-lang/es-AR' (which is not supported in 1.6.3) then the core will assume 'es-AR' is the language code. That value will be saved in the 'site_language' option.
Although this would be enough to dynamically add new languages there is one minor thing missing: its display in the combobox of the site language setting. So in order to fix this a new file need to exist which will hold the display name. This file will be treated in a similar way to the new addon 'metadata.json' files. This means it will be a json file which will hold key-value elements. One of those elements (as of 1.7.0, the only one) will have the key 'name'. The value associated to that key will be the display name. In the 'es-AR' case it would be 'Spanish - Argentina'.
The advantage of doing so is that not only will it be possible to support any language code and country combination but also additional metadata could be added in the future. For example, it could be possible to add data for the author of the language file or maybe its version.
Notes for translators and developers
In order to create a translation for 1.7+ you should follow these steps:
Create a directory under 'qa-lang' named as the language code for your country and optionally with a country code. It is not actually required to use an ISO code but it will make things easier if the idea is to make the translation public. EG: 'qa-lang/es' or 'qa-lang/es-AR'.
Copy all files from 'qa-include/lang' into the directory created in the previous step.
Translate the files in the directory created in step 1.
Create a the file 'metadata.json' under the directory created in step 1. EG: 'qa-lang/es/metadata.json' or 'qa-lang/es-AR/metadata.json'.
Add the following content to the file created in the previous step (of course, replace the language and country accordingly):
"name": "Spanish - Argentina"
For a while, the 1.6.3 translation system will coexist with the 1.7 one but the former will eventually dissappear so it is a good idea to start new translations (or modify any current one) in a way that supports the new system.