This function is specific to how the Win32 RC command line interprets language tags: invalid tags are rejected, but tags that don't have a specific assigned ID but are otherwise valid enough will get converted to an ID of LOCALE_CUSTOM_UNSPECIFIED.
pub fn tagToInt(tag: []const u8) error
pub fn tagToInt(tag: []const u8) error{InvalidLanguageTag}!u16 {
const maybe_id = try tagToId(tag);
if (maybe_id) |id| {
return @backingInt(id);
} else {
return LOCALE_CUSTOM_UNSPECIFIED;
}
}