https://github.com/JuliaLang/julia
Raw File
Tip revision: 2ac304dfba75fad148d4070ef4f8a2e400c305bb authored by Tony Kelman on 18 March 2016, 00:58:17 UTC
Tag v0.4.5
Tip revision: 2ac304d
i18n.jl
# This file is a part of Julia. License is MIT: http://julialang.org/license

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