func NewLocale(tag language.Tag) (loc *Locale, err error) {
	if loaded := GetLocale(tag); loaded != nil {
		return loaded, nil
	}
	localeData, err := GetLocaleData(tag)
	if err != nil {
		return
	}
	l := Locale{
		Tag:            tag,
		Number:         localeData.Number,
		Calendar:       localeData.Calendar,
		Plural:         localeData.Plural,
		Languages:      localeData.Languages,
		Territories:    localeData.Territories,
		DisplayPattern: localeData.Display,
		catalog:        catalog.NewBuilder(),
		translations:   make(map[string]*store.Translation),
	}
	llMutex.Lock()
	defer llMutex.Unlock()
	loadedLocales[tag] = &l
	return &l, nil
}
NewLocale instantiates a new Locale for the supplied language tag. It does not load any translations, so it's
useful when you only need to use the CLDR data (number/calendar etc). Use NewLocaleWithStore to load translations
at initialization time, or call Load on the Locale returned by this function.
package localizer
import (
	"errors"
	"fmt"
	"regexp"
	"strings"
	"sync"
	"github.com/razor-1/localizer-cldr"
	"github.com/razor-1/localizer-cldr/resources"
	"golang.org/x/text/language"
	"golang.org/x/text/message"
	"golang.org/x/text/message/catalog"
	"github.com/razor-1/localizer/store"
)
type Locale struct {
	Tag            language.Tag
	Number         cldr.Number
	Calendar       cldr.Calendar
	Plural         cldr.Plural
	Languages      cldr.Languages
	Territories    cldr.Territories
	DisplayPattern cldr.LocaleDisplayPattern
	catalog        *catalog.Builder
	translations   map[string]*store.Translation
	trMutex        sync.RWMutex
}
var llMutex sync.RWMutex
var loadedLocales = make(map[language.Tag]*Locale)