elrido / ZeroBin

This Project has been renamed and moved to
https://github.com/PrivateBin/PrivateBin
Other
85 stars 8 forks source link

Make one language the default language #39

Closed Brawl345 closed 9 years ago

Brawl345 commented 9 years ago

Thank you for updating ZeroBin! But I have one question: is there a way I can set one language such as german as the default and no other languages, not even english are loaded?

elrido commented 9 years ago

Currently no.

The way the translation works is that English is the built in default, if no translation file matching the visitors browser language is found. We could add a configuration option to select another language as the default instead of English.

With that option set, you could just remove any other language-files in your install and it would always be that language, except if the visitors browser language is English. Since that one is built in, it can't be removed.

Would that cover your use case?

Brawl345 commented 9 years ago

I need to have only one language available, not english :/ Is there a way to use another translation for english? Then I could work around this problem. I tried to copy a language file and rename it to en,json, but it doesn't seem to work.

elrido commented 9 years ago

Well, then I would rather offer two options: One to set a different default language and another to force it to use only that language.

If that's Ok, I will prepare a release with these options next weekend or early next week.

Brawl345 commented 9 years ago

Yes, that would be great! Thank you.

elrido commented 9 years ago

To use only one language as you intend, go to section [main] in conf.ini, set languageselection to false and languagedefault to "de", like this:

languageselection = false
languagedefault = "de"
Brawl345 commented 9 years ago

Thank you very much!