2010-10-14 08:27:31 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2010-10-08 10:26:23 +02:00
|
|
|
/*
|
2013-04-19 21:10:42 +01:00
|
|
|
* This file is part of the LibreOffice project.
|
2010-10-07 12:29:38 +02:00
|
|
|
*
|
2013-04-19 21:10:42 +01:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
2010-10-08 10:26:23 +02:00
|
|
|
*/
|
2010-10-07 12:29:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
#include <svtools/langhelp.hxx>
|
|
|
|
|
|
|
|
#include <vcl/svapp.hxx>
|
2014-01-02 23:52:37 +01:00
|
|
|
#include <vcl/settings.hxx>
|
2010-10-07 12:29:38 +02:00
|
|
|
#include <rtl/ustring.hxx>
|
|
|
|
|
2013-01-15 10:35:20 +01:00
|
|
|
void localizeWebserviceURI( OUString& rURI )
|
2010-10-07 12:29:38 +02:00
|
|
|
{
|
2013-01-15 10:35:20 +01:00
|
|
|
OUString aLang = Application::GetSettings().GetUILanguageTag().getLanguage();
|
|
|
|
if ( aLang.equalsIgnoreAsciiCase("pt")
|
|
|
|
&& Application::GetSettings().GetUILanguageTag().getCountry().equalsIgnoreAsciiCase("br") )
|
2010-10-07 12:29:38 +02:00
|
|
|
{
|
2013-10-31 17:40:05 +02:00
|
|
|
aLang = "pt-br";
|
2013-01-15 10:35:20 +01:00
|
|
|
}
|
|
|
|
if ( aLang.equalsIgnoreAsciiCase("zh") )
|
|
|
|
{
|
|
|
|
if ( Application::GetSettings().GetUILanguageTag().getCountry().equalsIgnoreAsciiCase("cn") )
|
2013-10-31 17:40:05 +02:00
|
|
|
aLang = "zh-cn";
|
2013-01-15 10:35:20 +01:00
|
|
|
if ( Application::GetSettings().GetUILanguageTag().getCountry().equalsIgnoreAsciiCase("tw") )
|
2013-10-31 17:40:05 +02:00
|
|
|
aLang = "zh-tw";
|
2010-10-07 12:29:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
rURI += aLang;
|
|
|
|
}
|
2010-10-14 08:27:31 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|