The OpenEHR specification specifies languages should use ISO 639-1 codes.
However, in various locations (most ADL files and the list with language codes found here: https://github.com/openEHR/terminology/blob/master/openEHR_RM/RM/Release-1.0.2/external_terminologies.xml#L263 ) contain invalid ISO 639-1 codes.
For instance, ar-sa is not a valid ISO 639-1 code. (An ISO 639-1 code contains only two letters: http://www.loc.gov/standards/iso639-2/php/code_list.php )
It would be better to update the spec and use RFC 5646 ( http://tools.ietf.org/html/rfc5646 ) compliant codes. (which is an ISO 639-1 language code optionally followed by an ISO 3166-1 alpha-2 country code)
Since everybody seems to be using this form already, it should not pose a big problem.
However, RFC 5646 also contains other formats like "zh-cmn-Hans-CN"
It would be nice to fully allow RFC 5646 but it might break a lot of software so perhaps it would be better to just allow "<language>-<country>" for now and to fully support RFC 5646 in the next major release of the specs.