File indexing completed on 2024-05-19 04:56:13

0001 /**
0002  * \file loadtranslation.h
0003  * Load application translation.
0004  *
0005  * \b Project: Kid3
0006  * \author Urs Fleisch
0007  * \date 26 Mar 2013
0008  *
0009  * Copyright (C) 2013-2018  Urs Fleisch
0010  *
0011  * This file is part of Kid3.
0012  *
0013  * Kid3 is free software; you can redistribute it and/or modify
0014  * it under the terms of the GNU General Public License as published by
0015  * the Free Software Foundation; either version 2 of the License, or
0016  * (at your option) any later version.
0017  *
0018  * Kid3 is distributed in the hope that it will be useful,
0019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0021  * GNU General Public License for more details.
0022  *
0023  * You should have received a copy of the GNU General Public License
0024  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
0025  */
0026 
0027 #pragma once
0028 
0029 #include <QString>
0030 #include "kid3api.h"
0031 
0032 namespace Utils {
0033 
0034 /**
0035  * @brief Load application translation.
0036  *
0037  * @param lang preferred language, if not set, the language is determined by
0038  * the system configuration
0039  */
0040 void KID3_CORE_EXPORT loadTranslation(const QString& lang = QString());
0041 
0042 /**
0043  * Prepend the application directory path to a path if it is relative.
0044  *
0045  * @param path file or directory path, will be modified if relative
0046  */
0047 void KID3_CORE_EXPORT prependApplicationDirPathIfRelative(QString& path);
0048 
0049 /**
0050  * Load list of available translations.
0051  * @return language codes of installed translations, e.g. {"de", "en", ...}.
0052  */
0053 QStringList KID3_CORE_EXPORT availableTranslations();
0054 
0055 }