• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

Kross

  • sources
  • kde-4.12
  • kdelibs
  • kross
  • modules
translation.h
Go to the documentation of this file.
1 /***************************************************************************
2  * translation.h
3  * This file is part of the KDE project
4  * copyright (C)2008 by Dag Andersen <danders@get2net.dk>
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Library General Public License for more details.
14  * You should have received a copy of the GNU Library General Public License
15  * along with this program; see the file COPYING. If not, write to
16  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  ***************************************************************************/
19 
20 #ifndef KROSS_TRANSLATION_H
21 #define KROSS_TRANSLATION_H
22 
23 #include <QObject>
24 #include <QVariantList>
25 
26 class QString;
27 
28 class KLocalizedString;
29 
30 namespace Kross {
31 
43  class TranslationModule: public QObject
44  {
45  Q_OBJECT
46 
47  public:
48  explicit TranslationModule();
49  virtual ~TranslationModule();
50 
51  public Q_SLOTS:
53  QString i18n( const QString &text, const QVariantList &arguments = QVariantList() ) const;
55  QString i18nc( const QString &context, const QString &text, const QVariantList &arguments = QVariantList() ) const;
57  QString i18np( const QString &singular, const QString &plural, int number, const QVariantList &arguments = QVariantList() ) const;
59  QString i18ncp( const QString &context, const QString &singular, const QString &plural, int number, const QVariantList &arguments = QVariantList() ) const;
60 
61  protected:
62  KLocalizedString substituteArguments( const KLocalizedString &kls, const QVariantList &arguments, int max = 99 ) const;
63 
64  private:
66  class Private;
68  Private* const d;
69  };
70 }
71 
72 #endif
73 
Kross::TranslationModule::~TranslationModule
virtual ~TranslationModule()
Definition: translation.cpp:57
Kross::TranslationModule::TranslationModule
TranslationModule()
Definition: translation.cpp:51
Kross::TranslationModule::i18ncp
QString i18ncp(const QString &context, const QString &singular, const QString &plural, int number, const QVariantList &arguments=QVariantList()) const
Creates localized string from a given plural and singular form dependent on number, with added context. Substitute arguments (may be empty)
Definition: translation.cpp:98
QString
QObject
Kross::TranslationModule::i18np
QString i18np(const QString &singular, const QString &plural, int number, const QVariantList &arguments=QVariantList()) const
Creates localized string from a given plural and singular form dependent on number. Substitute arguments (may be empty)
Definition: translation.cpp:92
Kross::TranslationModule::i18n
QString i18n(const QString &text, const QVariantList &arguments=QVariantList()) const
Creates localized string from a given text. Substitute arguments (may be empty)
Definition: translation.cpp:80
Kross::TranslationModule::i18nc
QString i18nc(const QString &context, const QString &text, const QVariantList &arguments=QVariantList()) const
Creates localized string from a given text, with added context. Substitute arguments (may be empty) ...
Definition: translation.cpp:86
Kross::TranslationModule
The TranslationModule provides access to KDE translation and internationalization facilities...
Definition: translation.h:43
KLocalizedString
Kross::TranslationModule::substituteArguments
KLocalizedString substituteArguments(const KLocalizedString &kls, const QVariantList &arguments, int max=99) const
Definition: translation.cpp:62
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Kross

Skip menu "Kross"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal