# Vietnamese locale unable to load

**URL:** https://meta.discourse.org/t/vietnamese-locale-unable-to-load/40364
**Category:** Support
**Created:** [3월 1, 2016, 1:29오전 UTC](https://meta.discourse.org/t/vietnamese-locale-unable-to-load/40364 "2016-03-01T01:29:10Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Minh\_Quang\_Vo](https://avatars.discourse-cdn.com/v4/letter/m/e47c2d/32.png) [@Minh\_Quang\_Vo](https://meta.discourse.org/u/Minh_Quang_Vo)
#### Post date: [3월 1, 2016, 1:29오전 UTC](https://meta.discourse.org/t/vietnamese-locale-unable-to-load/40364/1 "2016-03-01T01:29:10Z")

</div>

Hi all,

I’m just new to Ruby and Discourse. I would like create a new forum dedicated to Vietnamese folks. I just cloned the Discourse Docker at : [GitHub - discourse/discourse\_docker: A Docker image for Discourse · GitHub](https://github.com/discourse/discourse_docker).

I followed the instructions steps by steps :

- Used standalone.yml =\> changed to app.yml
- ./launcher bootstrap app
- ./launcher start app

Everything worked fine, except the Vietnamese translation. I changed my locale from “en” to “vi” but when logging back, I just got a blank page. I saw the following error in my log

```
 Started GET "/javascripts/locales/vi.js" for 127.0.0.1 at 2016-03-01 01:16:37 +0000
    ActionController::RoutingError (No route matches [GET] "/javascripts/locales/vi.js")
    /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
    Processing by ExceptionsController#not_found as */*
      Rendered exceptions/not_found.html.erb within layouts/no_ember (7.6ms)
      Rendered layouts/_head.html.erb (0.5ms)
      Rendered common/_special_font_face.html.erb (0.9ms)
      Rendered common/_discourse_stylesheet.html.erb (4.5ms)
      Rendered application/_header.html.erb (0.6ms)
      Rendered text template (0.0ms)
    Completed 404 Not Found in 67ms (Views: 0.5ms | ActiveRecord: 16.0ms)

```

I went to google and found out [How to add a new language - #10](https://meta.discourse.org/t/how-to-add-a-new-language/14970/10) . After having tried several times, I had the following issues:

app/assets/javascripts/locales/vi.js.erb doesn’t exist. I had to create one with the following content:

```
//= depend_on 'client.vi.yml'
//= require locales/i18n
<%= JsLocaleHelper.output_locale(:vi) %>

```

but when doing

```
cd /var/www/discourse
RAILS_ENV=production bundle exec rake assets:clobber assets:precompile

```

I got a weird error

```
Compressing: locales/vi-b5f2a031d44cf486f70e7c6573d4df7e.js
rake aborted!
Errno::ENOENT: No such file or directory - (/var/www/discourse/public/assets/locales/vi-b5f2a031d44cf486f70e7c6573d4df7e.js, /var/www/discourse/public/assets/locales/_vi-b5f2a031d44cf486f70e7c6573d4df7e.js)
/usr/local/lib/ruby/2.0.0/fileutils.rb:519:in `rename'
/usr/local/lib/ruby/2.0.0/fileutils.rb:519:in `block in mv'
/usr/local/lib/ruby/2.0.0/fileutils.rb:1558:in `block in fu_each_src_dest'
/usr/local/lib/ruby/2.0.0/fileutils.rb:1574:in `fu_each_src_dest0'
/usr/local/lib/ruby/2.0.0/fileutils.rb:1556:in `fu_each_src_dest'
/usr/local/lib/ruby/2.0.0/fileutils.rb:508:in `mv'
/var/www/discourse/lib/tasks/assets.rake:173:in `block (2 levels) in <top (required)>'
/var/www/discourse/lib/tasks/assets.rake:160:in `each'
/var/www/discourse/lib/tasks/assets.rake:160:in `block in <top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.5.0/lib/rake/task.rb:240:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.5.0/lib/rake/task.rb:240:in `block in execute'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `each'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `execute'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.5.0/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.5.0/lib/rake/task.rb:172:in `invoke_with_call_chain'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.5.0/lib/rake/task.rb:165:in `invoke'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.5.0/lib/rake/application.rb:150:in `invoke_task'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `each'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block in top_level'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.5.0/lib/rake/application.rb:115:in `run_with_threads'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.5.0/lib/rake/application.rb:100:in `top_level'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.5.0/lib/rake/application.rb:78:in `block in run'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.5.0/lib/rake/application.rb:176:in `standard_exception_handling'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.5.0/lib/rake/application.rb:75:in `run'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.5.0/bin/rake:33:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.0.0/bin/rake:22:in `load'
/var/www/discourse/vendor/bundle/ruby/2.0.0/bin/rake:22:in `<main>'
Tasks: TOP => assets:precompile

```

Please advise what I should do to enable Vietnamese locale. Thanks.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [3월 1, 2016, 2:41오전 UTC](https://meta.discourse.org/t/vietnamese-locale-unable-to-load/40364/2 "2016-03-01T02:41:51Z")

</div>

Is that the correct locale string? Did you check Transifex?

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [3월 1, 2016, 3:02오전 UTC](https://meta.discourse.org/t/vietnamese-locale-unable-to-load/40364/3 "2016-03-01T03:02:47Z")

</div>

> [@codinghorror](#):
>
> Is that the correct locale string?

NO

vi = Virgin Islands  
vn = Vietnam

---

<div class="post-metadata">

### Author: ![tuananh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tuananh/32/33428_2.png) [@tuananh](https://meta.discourse.org/u/tuananh)
#### Post date: [3월 1, 2016, 4:35오전 UTC](https://meta.discourse.org/t/vietnamese-locale-unable-to-load/40364/4 "2016-03-01T04:35:03Z")

</div>

i made mistake like this sometimes. it’s a bit confusing `vi_VN`

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [3월 1, 2016, 4:53오전 UTC](https://meta.discourse.org/t/vietnamese-locale-unable-to-load/40364/5 "2016-03-01T04:53:38Z")

</div>

Hmmm,

Now I’m confused.

It seems Discourse _is_ using “vi” for Vietnamese.

> <https://github.com/discourse/discourse/blob/main/config/locales/client.vi.yml>

> <https://github.com/discourse/discourse/blob/main/config/locales/server.vi.yml>

Maybe you need the transliteration yml too?

> <https://github.com/discourse/discourse/blob/main/config/locales/transliterate.vi.yml>

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [3월 1, 2016, 5:26오전 UTC](https://meta.discourse.org/t/vietnamese-locale-unable-to-load/40364/6 "2016-03-01T05:26:38Z")

</div>

> [@Minh\_Quang\_Vo](#):
>
> app/assets/javascripts/locales/vi.js.erb doesn’t exist.

Yes, this was a legit issue and I was able to repro it. I just added the `vi.js.erb` file:

[https://github.com/discourse/discourse/commit/f0653563ee5cf7376be5b236c5104661bbcd400b](https://github.com/discourse/discourse/commit/f0653563ee5cf7376be5b236c5104661bbcd400b)

@Minh_Quang_Vo can you try rebuilding your instance again?

```plaintext
cd /var/discourse
./launcher rebuild app

```

This should be fixed once the Discourse source code is updated on your server.

* * *

Also, I just noticed that there are many more Vietnamese locale files missing, as the [original PR](https://github.com/discourse/discourse/pull/1943) was incomplete. I will add all Vietnamese locale files later today.

* * *

> [@Mittineague](#):
>
> It seems Discourse is using “vi” for Vietnamese.

Yes, that is correct! Because:

[https://github.com/discourse/discourse/blob/master/.tx/config#L3](https://github.com/discourse/discourse/blob/master/.tx/config#L3)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [3월 1, 2016, 7:14오전 UTC](https://meta.discourse.org/t/vietnamese-locale-unable-to-load/40364/7 "2016-03-01T07:14:41Z")

</div>


