https://github.com/JuliaLang/julia
Raw File
Tip revision: fcc279cd5db9dd3406dc5a21c99e6b4077799b1c authored by Jeff Bezanson on 09 May 2017, 19:18:55 UTC
mark method cache as not needing specificity sorting
Tip revision: fcc279c
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