func (rs *ResourceSet) firstLang(typeID, resID Identifier) uint16 {
	te := rs.Types[typeID]
	if te == nil {
		return 0
	}

	re := te.Resources[resID]
	if re == nil {
		return 0
	}

	if len(re.Data) == 0 {
		return 0
	}

	re.order()

	return uint16(re.OrderedKeys[0])
}
// firstLang finds the first language ID of a resource.
//
// When an icon image has several languages, Windows takes the first one
// in the resource directory, even if it's not the same as the group's language,
// or the user's language.
//
// UpdateResource sorts resources just like winres does, so we may assume
// the first language in the file should be the lowest LCID.
firstLang finds the first language ID of a resource.

When an icon image has several languages, Windows takes the first one
in the resource directory, even if it's not the same as the group's language,
or the user's language.

UpdateResource sorts resources just like winres does, so we may assume
the first language in the file should be the lowest LCID.
// firstLang finds the first language ID of a resource . // // When an icon image has several languages Windows takes the first one // in the resource directory even if it ' s not the same as the group ' s language // or the user ' s language . // // UpdateResource sorts resources just like winres does so we may assume // the first language in the file should be the lowest LCID .
func (rs *ResourceSet) firstLang(typeID, resID Identifier) uint16 {
	te := rs.Types[typeID]
	if te == nil {
		return 0
	}
	re := te.Resources[resID]
	if re == nil {
		return 0
	}
	if len(re.Data) == 0 {
		return 0
	}
	re.order()
	return uint16(re.OrderedKeys[0])
}
func ( rs * ResourceSet ) firstLang ( typeID , resID Identifier ) uint16 { te := rs . Types [ typeID ] if te == nil { return 0 } re := te . Resources [ resID ] if re == nil { return 0 } if len ( re . Data ) == 0 { return 0 } re . order ( ) return uint16 ( re . OrderedKeys [ 0 ] ) }
firstLang finds the first language ID of a resource.
firstLang finds the first language ID of a resource .