loot / libloot

A C++ library for accessing LOOT's metadata and sorting functionality.
GNU General Public License v3.0
32 stars 12 forks source link

Allow matching locale codes against just language code #76

Closed Ortham closed 3 years ago

Ortham commented 3 years ago

If a message is the same in multiple dialects of a language, it would be useful to only specify the message text's language using the ISO 639 language code without a following country code. LOOT should then be able to match this against the current locale's language code.

For example, if a masterlist message is the same in Portuguese (pt_PT) and Brazilian Portuguese (pt_BR), then it should be possible to just specify the message language as pt. If a user then runs LOOT in Brazilian Portuguese or Portuguese, LOOT should select that message. If a message has the same language code appear on its own and also together with a language code (e.g. pt and pt_BR content are both present), then LOOT should select the closest match to the user's current language.

Infernio commented 3 years ago

ISO 636

ISO 639, 636 is about classification of welding consumables 😛

Ortham commented 3 years ago

ISO 636

ISO 639, 636 is about classification of welding consumables 😛

Fixed, thanks.

Ortham commented 3 years ago

Done in cd978bb215f48c158b6cd26ffaff280d1e854e01.