AceLocale-3.0 Documentation

Getting a hold of AceLocale:

local AceLocale = LibStub:GetLibrary("AceLocale-3.0")
local AceLocale = LibStub("AceLocale-3.0")

API

AceLocale:NewLocale( name, locale[, default] )
	name (string) - unique name of the locale table
	locale (string) - locale being registered (enUS, deDE, frFR etc)
	[default] (boolean) - indicate that this will be the default locale (usually enUS)
returns a table to register locales in or nil if no locales are needed.

AceLocale:GetLocale( name[, silent] )
	name (string) - unique name of the locale table you wish to retrieve
	[silent] (boolean) - when silent is set GetLocale will not error but silently return nil if a locale is not found.
Returns localizations for the current locale (or default locale if translations are missing)
Errors if nothing is registered (spank developer, not just a missing translation)	



USAGE EXAMPLE

local AceLocale = LibStub("AceLocale-3.0")

local L = AceLocale:NewLocale( "Foo", "enUS", true )

if L then
	L["bar"] = true
	L["foo"] = true
end

L = AceLocale:NewLocale( "Foo, "deDE" )

if L then
	L["bar"] = "barre"
	L["foo"] = "fuu"
end

..............


L = AceLocale:GetLocale( "Foo" )
print( L["bar"] )
