sbarex / MediaInfo

MacOS Finder Extension to show information about media files (images, video and audio), PDF and Office files on the contextual menu.
322 stars 6 forks source link

language flags are wrong or missing due to the language code and country code miss match #23

Open iderror opened 1 year ago

iderror commented 1 year ago

For a MKV file, the language code of each track is coded based on IETF BCP 47 language tag, and the first two letters are the language code from ISO 639. However, the language flag emojis use the 2-letters country code from ISO 3166-1. These two standards are not exactly match.

For example, the language code for Japanese is ja, while the country code for Japan is JP; the language code for Danish is da, while the country code for Denmark is DK. So, the country flags of such tracks do not display properly.

Furthermore, some language codes come with more information. Here are some examples. es-419 means Spanish appropriate for the Latin America and Caribbean region, and 419 comes from UN M.49 region code; but es-ES means Spanish appropriate for Spain, the latter ES comes from ISO 3166-1 country code. zh-Hans and zh-Hant means simplified Chinese and traditional Chinese respectively, the Hans and Hant come from ISO 15924 script code.

Thus to say, I don't think such appearance is a bug, since I don't find a proper way just using country flags to demonstrate the language property. Maybe a new design is better?

The followings are screen shots of such appearance.

截屏2023-09-05 17 44 19 截屏2023-09-05 17 51 42