One more Windows Translator fix.

This commit is contained in:
Stanislav Nikitin 2017-02-09 03:01:32 +05:00
parent 5be1b103cb
commit f934cc4d68
2 changed files with 2 additions and 1 deletions

View File

@ -90,6 +90,7 @@ func (t *Translator) Initialize() {
// Load translations into memory.
func (t *Translator) loadTranslations() {
fmt.Println("Loading translations for language " + t.Language)
fmt.Println("Translations directory: " + t.translationsPath)
t.translations[t.Language] = make(map[string]string)

View File

@ -37,7 +37,7 @@ func (t *Translator) detectLanguage() {
func (t *Translator) detectTranslationsDirectory() error {
// Translations MUST reside in directory neear binary!
// ToDo: more checks.
t.translationsPath, _ = filepath.Abs(filepath.Dir(os.Args[0]))
t.translationsPath, _ = filepath.join(filepath.Abs(filepath.Dir(os.Args[0])), "translations")
return nil
}