Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: add ENV for locale #2699

Closed
wants to merge 1 commit into from
Closed

RFC: add ENV for locale #2699

wants to merge 1 commit into from

Conversation

wlbksy
Copy link
Contributor

@wlbksy wlbksy commented Mar 27, 2013

add ENV["JULIA_LOCALE"], so we could make use of ENV
i18n helpdb is put byside of original helpdb.jl

$ ls usr/share/julia/
base  doc  examples  extras  helpdb.jl  helpdb_zh_CN.jl  test  ui
julia> ENV["JULIA_LOCALE"]="zh_CN"
"zh_CN"

julia> help(sin)
Loading help data...
Base.sin(x)

   计算 "x" 的正弦值,其中 "x" 的单位为弧度。 # This is Chinese ... 

julia> Base.locale("")

julia> help(sin)
Loading help data...
Base.sin(x)

   Compute sine of "x", where "x" is in radians

julia> Base.locale("zh_CN")

julia> help(sin)
Loading help data...
Base.sin(x)

   计算 "x" 的正弦值,其中 "x" 的单位为弧度。

julia>

@nolta
Copy link
Member

nolta commented Mar 27, 2013

This isn't necessary. There already exist standard environment variables for setting the locale (e.g., LANG) and functions for determining the current locale (e.g., setlocale).

@nolta nolta closed this Mar 27, 2013
@wlbksy wlbksy deleted the new_i18n branch March 28, 2013 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants