https://github.com/JuliaLang/julia
Raw File
Tip revision: 903644385b91ed8d95e5e3a5716c089dd1f1b08a authored by Tony Kelman on 19 June 2017, 13:05:28 UTC
Tag v0.6.0
Tip revision: 9036443
i18n.jl
# This file is a part of Julia. License is MIT: https://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::String)
    global LOCALE = s
    # XXX:TBD call setlocale
    for cb in CALLBACKS
        cb()
    end
end

end # module
back to top