Documentation
¶
Overview ¶
Package emoji holds the Unicode emoji catalog and multi-language CLDR names and keywords for base.EmojiPicker, generated from emojibase-data by go generate (internal/gen).
Everything is loaded lazily on first call with no package init, so Go's linker drops the embedded data completely from apps that never reach EmojiPicker or its lookup helpers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NormalizeLocales ¶
NormalizeLocales resolves langs to deduplicated supported locales, appending English as a fallback when it was not already requested.
func ResolveLocale ¶
ResolveLocale maps a BCP 47 locale tag to the closest supported emoji locale, or "" when none matches.
func SupportedLocales ¶
func SupportedLocales() []string
SupportedLocales returns the sorted list of locale codes bundled in emoji.bin.
Types ¶
type Category ¶
type Category uint8
Category is one of the nine Unicode emoji groups (excluding Component).
type Item ¶
type Item struct {
Index int
Emoji string
Name string
Keywords []string
Category Category
Skins []string
}
Item is a localized emoji returned by lookup and search.
func AllInCategory ¶
AllInCategory returns every emoji in cat localized in langs.
func ByString ¶
ByString looks up an emoji (base or skin-toned, with or without U+FE0F) and returns its localized Item, preserving any skin tone in Item.Emoji.
type LocaleEntry ¶
LocaleEntry is one emoji's name and keywords in a single language.
func LocaleTable ¶
func LocaleTable(loc string) []LocaleEntry
LocaleTable returns the localized names and keywords for a resolved locale code (e.g. "en", "zh", "ja"), inflating it once on demand.
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
gen
command
Command gen writes emoji.bin, the Unicode emoji catalog and multi-language CLDR names and keywords for package base/internal/emoji, from a pinned release of emojibase-data: go generate ./base/internal/emoji runs it.
|
Command gen writes emoji.bin, the Unicode emoji catalog and multi-language CLDR names and keywords for package base/internal/emoji, from a pinned release of emojibase-data: go generate ./base/internal/emoji runs it. |