Add: julia-0.6.2
Former-commit-id: ccc667cf67d569f3fb3df39aa57c2134755a7551
This commit is contained in:
26
julia-0.6.2/share/julia/base/i18n.jl
Normal file
26
julia-0.6.2/share/julia/base/i18n.jl
Normal file
@@ -0,0 +1,26 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user