https://github.com/JuliaLang/julia
Raw File
Tip revision: e6f843b0737bdffddbe4cf5c2f8b06278103fe64 authored by Tony Kelman on 22 August 2016, 23:43:04 UTC
Tag v0.5.0-rc3
Tip revision: e6f843b
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::String)
    global LOCALE = s
    # XXX:TBD call setlocale
    for cb in CALLBACKS
        cb()
    end
end

end # module
back to top