func NewLocaleWithStore(tag language.Tag, source store.TranslationStore) (loc *Locale, err error) {
	loc, err = NewLocale(tag)
	if err != nil {
		return
	}
	err = loc.Load(source)
	return
}
NewLocaleWithStore instantiates a new Locale for the supplied language tag. It loads the translations from the source
store.TranslationStore. Use this if you know you want your Locale to be populated with translations.
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)
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
}