VideoTools/vendor/github.com/jeandeaual/go-locale
Stu Leak 68df790d27 Fix player frame generation and video playback
Major improvements to UnifiedPlayer:

1. GetFrameImage() now works when paused for responsive UI updates
2. Play() method properly starts FFmpeg process
3. Frame display loop runs continuously for smooth video display
4. Disabled audio temporarily to fix video playback fundamentals
5. Simplified FFmpeg command to focus on video stream only

Player now:
- Generates video frames correctly
- Shows video when paused
- Has responsive progress tracking
- Starts playback properly

Next steps: Re-enable audio playback once video is stable
2026-01-07 22:20:00 -05:00
..
.gitattributes Fix player frame generation and video playback 2026-01-07 22:20:00 -05:00
.gitignore Fix player frame generation and video playback 2026-01-07 22:20:00 -05:00
.golangci.yml Fix player frame generation and video playback 2026-01-07 22:20:00 -05:00
LICENSE Fix player frame generation and video playback 2026-01-07 22:20:00 -05:00
locale_android.c Fix player frame generation and video playback 2026-01-07 22:20:00 -05:00
locale_android.go Fix player frame generation and video playback 2026-01-07 22:20:00 -05:00
locale_darwin_cgo.go Fix player frame generation and video playback 2026-01-07 22:20:00 -05:00
locale_darwin_nocgo.go Fix player frame generation and video playback 2026-01-07 22:20:00 -05:00
locale_darwin.go Fix player frame generation and video playback 2026-01-07 22:20:00 -05:00
locale_darwin.m Fix player frame generation and video playback 2026-01-07 22:20:00 -05:00
locale_ios.go Fix player frame generation and video playback 2026-01-07 22:20:00 -05:00
locale_ios.m Fix player frame generation and video playback 2026-01-07 22:20:00 -05:00
locale_js.go Fix player frame generation and video playback 2026-01-07 22:20:00 -05:00
locale_unix.go Fix player frame generation and video playback 2026-01-07 22:20:00 -05:00
locale_windows.go Fix player frame generation and video playback 2026-01-07 22:20:00 -05:00
README.md Fix player frame generation and video playback 2026-01-07 22:20:00 -05:00
util.go Fix player frame generation and video playback 2026-01-07 22:20:00 -05:00

go-locale

PkgGoDev Go Report Card Coverage Status test

Go library used to retrieve the current locale(s) of the operating system.

OS Support

Usage

GetLocales

GetLocales returns the user's preferred locales, by order of preference, as a slice of IETF BCP 47 language tag (e.g. []string{"en-US", "fr-FR", "ja-JP"}).

This works if the user set multiple languages on macOS and other Unix systems. Otherwise, it returns a slice with a single locale.

userLocales, err := locale.GetLocales()
if err == nil {
	fmt.Println("Locales:", userLocales)
}

This can be used with golang.org/x/text or go-i18n to set the localizer's language preferences:

import (
	"github.com/jeandeaual/go-locale"
	"golang.org/x/text/message"
)

func main() {
	userLocales, _ := locale.GetLocales()
	p := message.NewPrinter(message.MatchLanguage(userLocales...))
	...
}
import (
	"github.com/jeandeaual/go-locale"
	"github.com/nicksnyder/go-i18n/v2/i18n"
	"golang.org/x/text/language"
)

func main() {
	userLocales, _ := locale.GetLocales()
	bundle := i18n.NewBundle(language.English)
	localizer := i18n.NewLocalizer(bundle, userLocales...)
	...
}

GetLocale

GetLocale returns the current locale as defined in IETF BCP 47 (e.g. "en-US").

userLocale, err := locale.GetLocale()
if err == nil {
	fmt.Println("Locale:", userLocale)
}

GetLanguage

GetLanguage returns the current language as an ISO 639 language code (e.g. "en").

userLanguage, err := locale.GetLanguage()
if err == nil {
	fmt.Println("Language:", userLocale)
}

GetRegion

GetRegion returns the current language as an ISO 3166 country code (e.g. "US").

userRegion, err := locale.GetRegion()
if err == nil {
	fmt.Println("Region:", userRegion)
}

Aknowledgements

Inspired by jibber_jabber.