https://github.com/JuliaLang/julia
Raw File
Tip revision: 040f3ab6b7acc9507e8cc11b36e53df648e1b8d1 authored by Elliot Saba on 15 October 2013, 05:58:39 UTC
Tag v0.2.0-rc1
Tip revision: 040f3ab
i18n.jl
module I18n

export locale

LOCALE = nothing
CALLBACKS = Function[]

function locale()
    if LOCALE === nothing
        # XXX:TBD return default locale
        return ""
    end
    LOCALE
end

function locale(s::ByteString)
    global LOCALE = s
    # XXX:TBD call setlocale
    for cb in CALLBACKS
        cb()
    end
end

end # module
back to top