This repository has been archived on 2022-06-29. You can view files and clone it, but cannot push or open issues or pull requests.
urtrator/translator/translator_windows.go

44 lines
1.3 KiB
Go

// URTator - Urban Terror server browser and game launcher, written in
// Go.
//
// Copyright (c) 2016-2017, Stanislav N. aka pztrn.
// All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// +build windows
package translator
import (
// stdlib
"fmt"
"path/filepath"
"os"
)
// Detect language on Unices.
func (t *Translator) detectLanguage() {
fmt.Println("ToDo! Forcing en_US for now!")
t.Language = "en_US"
}
func (t *Translator) detectTranslationsDirectory() error {
// Translations MUST reside in directory neear binary!
// ToDo: more checks.
t.translationsPath, _ = filepath.join(filepath.Abs(filepath.Dir(os.Args[0])), "translations")
return nil
}