https://github.com/JuliaLang/julia
Raw File
Tip revision: ae26b25d43317d7dd3ca05f60b70677aab9c0e08 authored by Tony Kelman on 18 September 2016, 16:17:02 UTC
Tag v0.4.7
Tip revision: ae26b25
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