Changing default locale with incomplete locale file resulted in white page and error

I wanted to change the locale of my discourse site from _en to _hu. When I did that in the admin settings / basic settings, the page came back white with a 404 error on the hu.js.

javascripts/locales/hu.js

Any recommendation how to set it back to english would be much appreciated!

I can’t see hu as the available locale?

What language did you choose? Also, what’s the URL of your Discourse instance?

1 Like

The instance is discourse.inepex.net .

I choose HU. There was a HU locale, without searching I just rolled down in the list and found it. (hu for hungarian of course)

Strange, I don’t see “HU” locale on my local Discourse instance, or here on meta.

Anyways to fix this issue, run these commands on your server:

cd /var/discourse
./launcher enter app
rails c
SiteSetting.default_locale = 'en'

This should change your locale back to English.

2 Likes

We will try it and notify you with the results, thanks for the help.

1 Like

Hello again!

It turned out that we here at my company created a test locale, but it wasn’t finished (not even started, per se), but we had a file remaining on the server that the discourse thought to be a valid locale file. That’s why I could find _hu, even if it wasn’t finished on our side.

So the mistake was on our side as we didn’t cooperate and talk it through.

Still, it might pose a bug, as discourse didn’t know how to handle this situ but came back blank instead. Might be worth looking into.

Thanks for the help and the quick response, saved my day. Cheers!

3 Likes