src/hbcore/devicedialogbase/hbtextresolversymbian.cpp
changeset 0 16d8024aca5e
child 1 f7ac710697a9
equal deleted inserted replaced
-1:000000000000 0:16d8024aca5e
       
     1 /****************************************************************************
       
     2 **
       
     3 ** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
       
     4 ** All rights reserved.
       
     5 ** Contact: Nokia Corporation (developer.feedback@nokia.com)
       
     6 **
       
     7 ** This file is part of the HbCore module of the UI Extensions for Mobile.
       
     8 **
       
     9 ** GNU Lesser General Public License Usage
       
    10 ** This file may be used under the terms of the GNU Lesser General Public
       
    11 ** License version 2.1 as published by the Free Software Foundation and
       
    12 ** appearing in the file LICENSE.LGPL included in the packaging of this file.
       
    13 ** Please review the following information to ensure the GNU Lesser General
       
    14 ** Public License version 2.1 requirements will be met:
       
    15 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
       
    16 **
       
    17 ** In addition, as a special exception, Nokia gives you certain additional
       
    18 ** rights.  These rights are described in the Nokia Qt LGPL Exception
       
    19 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
       
    20 **
       
    21 ** If you have questions regarding the use of this file, please contact
       
    22 ** Nokia at developer.feedback@nokia.com.
       
    23 **
       
    24 ****************************************************************************/
       
    25 
       
    26 #include "hbtextresolversymbian.h"
       
    27 #include <hbsymbianvariant.h>
       
    28 #include <e32des16.h>
       
    29 #include <QByteArray>
       
    30 #include <QTranslator>
       
    31 #include <QString>
       
    32 #include <QDebug>
       
    33 #include <QFile>
       
    34 #include <QTextStream>
       
    35 
       
    36 class HbTextResolverSymbianPrivate: public CBase
       
    37     {
       
    38 public:
       
    39     HbTextResolverSymbianPrivate();    
       
    40     virtual ~HbTextResolverSymbianPrivate();
       
    41     static HbTextResolverSymbianPrivate* Instance();
       
    42     TBool LoadTranslationFile();
       
    43     TBool Initialize(const TDesC& aFilename, const TDesC& aPath);
       
    44     HBufC* LoadLC(const TDesC& aMessageId, TInt aPlural); // Simple string. + %n message(s). Plural and replaces all occurances of %n in the string.
       
    45     HBufC* LoadLC(const TDesC& aMessageId, const TDesC& aString, TInt aPlural); // One and %1. %n and %1. Plural and replaces all occurances of %n in the string.
       
    46     HBufC* LoadLC(const TDesC& aMessageId, const MDesCArray& aStrings, TInt aPlural);
       
    47     HBufC* LoadLC(const TDesC& aMessageId, TInt aInt, TInt aPlural);
       
    48     HBufC* LoadLC(const TDesC& aMessageId, const RArray<TInt>& aInts, TInt aPlural);    
       
    49         
       
    50     QString ConvertToQString(const TDesC& aMessageId, TInt aPlural = -1);
       
    51     QTranslator iTranslator;
       
    52     QByteArray iByteArray;
       
    53     TBool iLoaded; 
       
    54     QString fileName;
       
    55     QString path;        	      
       
    56     };
       
    57 
       
    58 Q_GLOBAL_STATIC(HbTextResolverSymbianPrivate, hbTextResolverSymbianPrivate)
       
    59 
       
    60 HbTextResolverSymbianPrivate* HbTextResolverSymbianPrivate::Instance()
       
    61     {
       
    62     HbTextResolverSymbianPrivate* resolver = hbTextResolverSymbianPrivate();
       
    63     return resolver;         
       
    64     }
       
    65     
       
    66 static void replacePercentN(QString *result, int n)
       
    67 {
       
    68     if (n >= 0) {
       
    69         int percentPos = 0;
       
    70         int len = 0;
       
    71         while ((percentPos = result->indexOf(QLatin1Char('%'), percentPos + len)) != -1) {
       
    72             len = 1;
       
    73             QString fmt;
       
    74             if (result->at(percentPos + len) == QLatin1Char('L')) {
       
    75                 ++len;
       
    76                 fmt = QLatin1String("%L1");
       
    77             } else {
       
    78                 fmt = QLatin1String("%1");
       
    79             }
       
    80             if (result->at(percentPos + len) == QLatin1Char('n')) {
       
    81                 fmt = fmt.arg(n);
       
    82                 ++len;
       
    83                 result->replace(percentPos, len, fmt);
       
    84                 len = fmt.length();
       
    85             }
       
    86         }
       
    87     }
       
    88 }
       
    89 
       
    90 HbTextResolverSymbianPrivate::HbTextResolverSymbianPrivate()
       
    91     {        
       
    92     }
       
    93     
       
    94 HbTextResolverSymbianPrivate::~HbTextResolverSymbianPrivate()
       
    95     {
       
    96     }
       
    97 
       
    98 TBool HbTextResolverSymbianPrivate::LoadTranslationFile()
       
    99     {
       
   100     QString locale = QLocale::system().name();        
       
   101     return iTranslator.load(fileName + locale, path);                
       
   102     }     
       
   103 
       
   104 TBool HbTextResolverSymbianPrivate::Initialize(const TDesC& aFilename, const TDesC& aPath)
       
   105     {
       
   106     fileName = QString::fromUtf16(aFilename.Ptr(), aFilename.Length());
       
   107     path = QString::fromUtf16(aPath.Ptr(), aPath.Length());
       
   108     return LoadTranslationFile();  
       
   109     }
       
   110        
       
   111 HBufC* HbTextResolverSymbianPrivate::LoadLC(const TDesC& aMessageId, TInt aPlural)
       
   112     {
       
   113     QString string = ConvertToQString(aMessageId, aPlural);
       
   114         
       
   115     TPtrC descriptor(static_cast<const TUint16*>(string.utf16()),
       
   116                     string.length());
       
   117     return descriptor.AllocLC();
       
   118     }
       
   119  
       
   120 HBufC* HbTextResolverSymbianPrivate::LoadLC(const TDesC& aMessageId, const TDesC& aString, TInt aPlural)
       
   121     {
       
   122     QString string = ConvertToQString(aMessageId, aPlural);
       
   123     QString result = ConvertToQString(aString);
       
   124     
       
   125     if (result.isEmpty())
       
   126         {
       
   127         result = QString::fromUtf16(aString.Ptr(), aString.Length());
       
   128         }
       
   129     string = string.arg(result);     
       
   130     TPtrC descriptor(static_cast<const TUint16*>(string.utf16()),
       
   131                     string.length());
       
   132     return descriptor.AllocLC();       
       
   133     }
       
   134 
       
   135 HBufC* HbTextResolverSymbianPrivate::LoadLC(const TDesC& aMessageId, const MDesCArray& aStrings, TInt aPlural)
       
   136     {
       
   137     QString string = ConvertToQString(aMessageId, aPlural);
       
   138     
       
   139     QString tmp;
       
   140     for (int i(0); i < aStrings.MdcaCount(); i++)
       
   141         {
       
   142         TPtrC ptr = aStrings.MdcaPoint(i);
       
   143         tmp = ConvertToQString(ptr);
       
   144         
       
   145         if (tmp.isEmpty() == 0)
       
   146             {
       
   147             tmp = QString::fromUtf16(ptr.Ptr(), ptr.Length());
       
   148             }
       
   149         
       
   150         bool ok(false);
       
   151         int conv = tmp.toInt(&ok); 
       
   152 
       
   153         if (ok) 
       
   154             {   
       
   155             string = string.arg(conv);	
       
   156             } 
       
   157         else
       
   158             {
       
   159             string = string.arg(tmp);
       
   160             }
       
   161         }            
       
   162     TPtrC descriptor(static_cast<const TUint16*>(string.utf16()),
       
   163                     string.length());
       
   164     return descriptor.AllocLC();
       
   165     }
       
   166        
       
   167 HBufC* HbTextResolverSymbianPrivate::LoadLC(const TDesC& aMessageId, TInt aInt, TInt aPlural)
       
   168     {
       
   169     QString string = ConvertToQString(aMessageId, aPlural);       
       
   170     string = string.arg(aInt); 
       
   171     
       
   172     TPtrC descriptor(static_cast<const TUint16*>(string.utf16()),
       
   173                     string.length());
       
   174     return descriptor.AllocLC(); 
       
   175     }    
       
   176         
       
   177 HBufC* HbTextResolverSymbianPrivate::LoadLC(const TDesC& aMessageId, const RArray<TInt>& aInts, TInt aPlural)
       
   178     {
       
   179     QString string = ConvertToQString(aMessageId, aPlural);
       
   180     
       
   181     for (int i(0); i < aInts.Count(); i++)
       
   182         {                              
       
   183         string = string.arg(aInts[i]);
       
   184         }            
       
   185              
       
   186     TPtrC descriptor(static_cast<const TUint16*>(string.utf16()),
       
   187                     string.length());
       
   188     return descriptor.AllocLC();
       
   189     }
       
   190         
       
   191 QString HbTextResolverSymbianPrivate::ConvertToQString(const TDesC& aMessageId, TInt aPlural)
       
   192     {        
       
   193     QString result = QString::fromUtf16(aMessageId.Ptr(), aMessageId.Length());
       
   194     iByteArray = result.toLatin1();
       
   195     const char* tmp = iByteArray.data();        
       
   196 
       
   197     QString string;
       
   198     if (aPlural == -1)
       
   199         {        
       
   200         string = iTranslator.translate(0, tmp, 0);           
       
   201         }
       
   202     else
       
   203         {
       
   204         string = iTranslator.translate(0, tmp, 0, aPlural);
       
   205         }
       
   206 
       
   207     if (string.isEmpty()) 
       
   208         {
       
   209         string = result;
       
   210         }
       
   211     replacePercentN(&string, aPlural);
       
   212     return string;
       
   213     }
       
   214 
       
   215 /*!
       
   216     \class HbTextResolverSymbian
       
   217     \brief HbTextResolverSymbian implements translation support for Symbian OS applications.
       
   218     
       
   219     HbTextResolverSymbian is class that provides convinience API for translation support and
       
   220     is meant to be used only by pure Symbian OS applications. Dynamic strings and plurals are
       
   221     also supported. 
       
   222     
       
   223     Before using the translation support HbTextResolverSymbian must be initialized. Note that 
       
   224     the filename must not have language specific suffix, because that is handled internally by
       
   225     HbTextResolverSymbian.
       
   226     
       
   227     \code
       
   228     _LIT(KSomeFile, "somefile_");
       
   229     _LIT(KPath, "c:\\resource");
       
   230     
       
   231     TBool result = HbTextResolverSymbian::Init(KSomeFile, KPath);
       
   232     \endcode
       
   233     
       
   234     Translating a string given the snippet from a translation file (.ts) below:
       
   235     ...
       
   236     \code
       
   237     <message id="text_test">
       
   238         <source>Test</source>
       
   239         <translation>Text test</translation>
       
   240     </message>
       
   241     
       
   242 
       
   243     _LIT(KTextTest, "text_test");
       
   244     // returns the string "Text test"
       
   245     HBufC* tmp = HbTextResolverSymbian::LoadL(KTextTest);
       
   246     \endcode
       
   247     
       
   248     Translating a string with replacement string given the snippet from a translation
       
   249     file below:
       
   250     
       
   251     \code
       
   252     <message id="text_test2">
       
   253         <source>Test2</source>
       
   254         <translation>Test2 %1</translation>
       
   255     </message>
       
   256     
       
   257     
       
   258     _LIT(KTextTest2, "text_test2");
       
   259     _LIT(KTextTestReplace,"passed.");
       
   260     // returns the string "Test2 passed." 
       
   261     HBufC* tmp = HbTextResolverSymbian::LoadL(KTextTest2, KTextTestReplace);
       
   262     \endcode
       
   263    
       
   264     Translating a string with replacement strings given the snippet from a translation
       
   265     file below:
       
   266     
       
   267     \code
       
   268     <message id="text_test3">
       
   269         <source>Test3</source>
       
   270         <translation>Test3 %1 %2</translation>
       
   271     </message>
       
   272     
       
   273     
       
   274     _LIT(KTextTest3, "text_test3");
       
   275     _LIT(KTextTest3Replace1,"is");
       
   276     _LIT(KTextTest3Replace2,"passed.");
       
   277     
       
   278     CDesC16ArrayFlat* array = new CDesC16ArrayFlat(8);
       
   279     TBufC<20> buffer;
       
   280     buffer = KTextTest3Replace1;
       
   281     array->AppendL(buffer);
       
   282     buffer = KTextTest3Replace2;
       
   283     array->AppendL(buffer);
       
   284     // returns the string "Test3 is passed."
       
   285     HBufC* tmp = HbTextResolverSymbian::LoadL(KTextTest3, *array);
       
   286    \endcode       
       
   287    
       
   288    Note: String e.g. "Moving %1 files of %2 from %3" where place markers %1 and %2 are
       
   289    for integer values and the %3 is for a string, requires that the integers are converted
       
   290    to descriptors and appended to MDesArray. Those are converted back to integers during 
       
   291    replacement.
       
   292    
       
   293    Translating a string with replacement integer given the snippet from a translation
       
   294    file below:
       
   295    \code
       
   296     </message>
       
   297         <message id="text_test4" numerus="yes">
       
   298         <source>Test4</source>
       
   299         <translation>
       
   300         <numerusform>%n message of %1</numerusform>
       
   301         <numerusform>%n messages of %1</numerusform>
       
   302         </translation>
       
   303     </message>
       
   304     
       
   305     
       
   306     _LIT(KTextTest4, "text_test4");
       
   307     // returns the string "1 message of 5"
       
   308     HBufC* tmp = HbTextResolverSymbian::LoadL(KTextTest4, 5, 1);
       
   309     // // returns the string "2 messages of 5"
       
   310     tmp = HbTextResolverSymbian::LoadL(KTextTest4, 5, 2);
       
   311     \endcode
       
   312     
       
   313     Translating a string with replacement integers given the snippet from a translation
       
   314     file below:
       
   315     \code
       
   316     <message id="text_test3">
       
   317         <source>Test3</source>
       
   318         <translation>Test3 %1 %2</translation>
       
   319     </message>
       
   320     
       
   321     
       
   322     RArray<TInt> intarray;
       
   323     intarray.Append(20);
       
   324     intarray.Append(30);
       
   325     
       
   326     HBufC* tmp = HbTextResolverSymbian::LoadL(KTextTest3, intarray, 1);
       
   327     \endcode
       
   328     
       
   329 */
       
   330 
       
   331 /*!
       
   332     Initializes the translator. 
       
   333         
       
   334     \param aFilename specifies the used translation file. 
       
   335     \param aPath specifies path to translation file.
       
   336     
       
   337     Returns ETrue if initialization was succesful.     
       
   338 */
       
   339 EXPORT_C TBool HbTextResolverSymbian::Init(const TDesC& aFilename, const TDesC& aPath)
       
   340     {
       
   341     HbTextResolverSymbianPrivate* resolver = HbTextResolverSymbianPrivate::Instance();
       
   342     return resolver->Initialize(aFilename, aPath);
       
   343     }    
       
   344 
       
   345 /*!
       
   346     Translates the string. 
       
   347     If aPlural is equal to zero or greater, then the translation depending on the 
       
   348     value is returned. Returns a pointer to a heap descriptor containing the translated
       
   349     string.  
       
   350     If the string for passed \a aMessageId is not found from the translation file then 
       
   351     the source string is returned. 
       
   352         
       
   353     \param aMessageId Identifier of the string to be translated.
       
   354     \param aPlural Specifies the plural format of the translation.    
       
   355 */
       
   356 EXPORT_C HBufC* HbTextResolverSymbian::LoadL(const TDesC& aMessageId, TInt aPlural)
       
   357     {
       
   358     HbTextResolverSymbianPrivate* resolver = HbTextResolverSymbianPrivate::Instance();    
       
   359     HBufC* buf = resolver->LoadLC(aMessageId, aPlural);
       
   360     CleanupStack::Pop(buf);        
       
   361     return buf;
       
   362     }
       
   363 
       
   364 /*!
       
   365     Translates the string and replaces the lowest place marker with the replacement string. 
       
   366     If \a aPlural is equal to zero or greater, then translation depending on the value
       
   367     is returned. Returns a pointer to a heap descriptor containing the formatted string.
       
   368     If the string for passed \a aMessageId or \a aString is not found from the translation
       
   369     file then the source string is used. 
       
   370         
       
   371     \param aMessageId Identifier of the string to be translated.
       
   372     \param aString Replacement string for the lowest %N.
       
   373     \param aPlural Specifies the plural format of the translation.   
       
   374 */       
       
   375 EXPORT_C HBufC* HbTextResolverSymbian::LoadL(const TDesC& aMessageId, const TDesC& aString, TInt aPlural)
       
   376     {
       
   377     HbTextResolverSymbianPrivate* resolver = HbTextResolverSymbianPrivate::Instance();
       
   378     HBufC* buf = resolver->LoadLC(aMessageId, aString, aPlural);
       
   379     CleanupStack::Pop(buf);    
       
   380     return buf;    
       
   381     } 
       
   382 
       
   383 /*!
       
   384     Translates the string and replaces place markers from the lowest place marker with the 
       
   385     replacement strings provided in the array. 
       
   386     If \a aPlural is equal to zero or greater, then translation depending on the value
       
   387     is returned. Returns a pointer to a heap descriptor containing the formatted string.
       
   388     If the string for passed \a aMessageId or \a aStrings are not found from the translation
       
   389     file then the source string is used.      
       
   390         
       
   391     \param aMessageId Identifier of the string to be translated.
       
   392     \param aStrings Replacement strings for the place markers.
       
   393     \param aPlural Specifies the plural format of the translation.   
       
   394 */          
       
   395 EXPORT_C HBufC* HbTextResolverSymbian::LoadL(const TDesC& aMessageId, const MDesCArray& aStrings, TInt aPlural)
       
   396     {
       
   397     HbTextResolverSymbianPrivate* resolver = HbTextResolverSymbianPrivate::Instance();
       
   398     HBufC* buf = resolver->LoadLC(aMessageId, aStrings, aPlural);
       
   399     CleanupStack::Pop(buf);
       
   400     return buf; 
       
   401     }
       
   402 
       
   403 /*!
       
   404     Translates the string and replaces the lowest place marker with the replacement integer. 
       
   405     If \a aPlural is equal to zero or greater, then translation depending on the value
       
   406     is returned. Returns a pointer to a heap descriptor containing the formatted string.
       
   407     If the string for passed \a aMessageId is not found from the translation
       
   408     file then the source string is used. 
       
   409         
       
   410     \param aMessageId Identifier of the string to be translated.
       
   411     \param aInt Replacement integer for the lowest place marker %(index).
       
   412     \param aPlural Specifies the plural format of the translation.   
       
   413 */    
       
   414 EXPORT_C HBufC* HbTextResolverSymbian::LoadL(const TDesC& aMessageId, TInt aInt, TInt aPlural)
       
   415     {
       
   416     HbTextResolverSymbianPrivate* resolver = HbTextResolverSymbianPrivate::Instance();
       
   417     HBufC* buf = resolver->LoadLC(aMessageId, aInt, aPlural);      
       
   418     CleanupStack::Pop(buf);
       
   419     return buf;     
       
   420     } 
       
   421 
       
   422 /*!
       
   423     Translates the string and replaces place markers from the lowest place marker with the 
       
   424     replacement integers provided in the array. 
       
   425     If \a aPlural is equal to zero or greater, then translation depending on the value
       
   426     is returned. Returns a pointer to a heap descriptor containing the formatted string.
       
   427     If the string for passed \a aMessageId is not found from the translation
       
   428     file then the source string is used.
       
   429            
       
   430     \param aMessageId Identifier of the string to be translated.
       
   431     \param aInts Replacement integers for the place markers.
       
   432     \param aPlural Specifies the plural format of the translation.   
       
   433 */         
       
   434 EXPORT_C HBufC* HbTextResolverSymbian::LoadL(const TDesC& aMessageId, const RArray<TInt>& aInts, TInt aPlural)
       
   435     {
       
   436     HbTextResolverSymbianPrivate* resolver = HbTextResolverSymbianPrivate::Instance();
       
   437     HBufC* buf = resolver->LoadLC(aMessageId, aInts, aPlural);
       
   438     CleanupStack::Pop(buf);    
       
   439     return buf;
       
   440     }
       
   441 
       
   442 /*!
       
   443     Translates the string. 
       
   444     If aPlural is equal to zero or greater, then the translation depending on the 
       
   445     value is returned. Returns a pointer to a heap descriptor containing the translated
       
   446     string. Pointer is pushed to cleanup stack.  
       
   447     If the string for passed \a aMessageId is not found from the translation file then 
       
   448     the source string is returned. 
       
   449         
       
   450     \param aMessageId Identifier of the string to be translated.
       
   451     \param aPlural Specifies the plural format of the translation.    
       
   452 */     
       
   453 EXPORT_C HBufC* HbTextResolverSymbian::LoadLC(const TDesC& aMessageId, TInt aPlural)
       
   454     {
       
   455     HbTextResolverSymbianPrivate* resolver = HbTextResolverSymbianPrivate::Instance();
       
   456     return resolver->LoadLC(aMessageId, aPlural);       
       
   457     }
       
   458 
       
   459 /*!
       
   460     Translates the string and replaces the lowest place marker with the replacement string. 
       
   461     If \a aPlural is equal to zero or greater, then translation depending on the value
       
   462     is returned. Returns a pointer to a heap descriptor containing the formatted string. 
       
   463     Pointer is pushed to cleanup stack.
       
   464     If the string for passed \a aMessageId or \a aString is not found from the translation
       
   465     file then the source string is used. 
       
   466         
       
   467     \param aMessageId Identifier of the string to be translated.
       
   468     \param aString Replacement string for the lowest %N.
       
   469     \param aPlural Specifies the plural format of the translation.   
       
   470 */         
       
   471 EXPORT_C HBufC* HbTextResolverSymbian::LoadLC(const TDesC& aMessageId, const TDesC& aString, TInt aPlural)
       
   472     {
       
   473     HbTextResolverSymbianPrivate* resolver = HbTextResolverSymbianPrivate::Instance();
       
   474     return resolver->LoadLC(aMessageId, aString, aPlural);
       
   475     }
       
   476 
       
   477 /*!
       
   478     Translates the string and replaces place markers from the lowest place marker with the 
       
   479     replacement strings provided in the array. 
       
   480     If \a aPlural is equal to zero or greater, then translation depending on the value
       
   481     is returned. Returns a pointer to a heap descriptor containing the formatted string.
       
   482     Pointer is pushed to cleanup stack.
       
   483     If the string for passed \a aMessageId or \a aStrings are not found from the translation
       
   484     file then the source string is used.
       
   485         
       
   486     \param aMessageId Identifier of the string to be translated.
       
   487     \param aStrings Replacement strings for the place markers.
       
   488     \param aPlural Specifies the plural format of the translation.   
       
   489 */
       
   490 EXPORT_C HBufC* HbTextResolverSymbian::LoadLC(const TDesC& aMessageId, const MDesCArray& aStrings, TInt aPlural)
       
   491     {
       
   492     HbTextResolverSymbianPrivate* resolver = HbTextResolverSymbianPrivate::Instance();
       
   493     return resolver->LoadLC(aMessageId, aStrings, aPlural);
       
   494     }
       
   495 
       
   496 /*!
       
   497     Translates the string and replaces the lowest place marker with the replacement integer. 
       
   498     If \a aPlural is equal to zero or greater, then translation depending on the value
       
   499     is returned. Returns a pointer to a heap descriptor containing the formatted string.
       
   500     If the string for passed \a aMessageId is not found from the translation
       
   501     file then the source string is used. 
       
   502         
       
   503     \param aMessageId Identifier of the string to be translated.
       
   504     \param aInt Replacement integer for the lowest place marker %(index).
       
   505     \param aPlural Specifies the plural format of the translation.   
       
   506 */ 
       
   507 EXPORT_C HBufC* HbTextResolverSymbian::LoadLC(const TDesC& aMessageId, TInt aInt, TInt aPlural)
       
   508     {
       
   509     HbTextResolverSymbianPrivate* resolver = HbTextResolverSymbianPrivate::Instance();   
       
   510     return resolver->LoadLC(aMessageId, aInt, aPlural);
       
   511     }
       
   512 
       
   513 /*!
       
   514     Translates the string and replaces place markers from the lowest place marker with the 
       
   515     replacement integers provided in the array. 
       
   516     If \a aPlural is equal to zero or greater, then translation depending on the value
       
   517     is returned. Returns a pointer to a heap descriptor containing the formatted string.
       
   518     If the string for passed \a aMessageId is not found from the translation
       
   519     file then the source string is used.
       
   520            
       
   521     \param aMessageId Identifier of the string to be translated.
       
   522     \param aInts Replacement integers for the place markers.
       
   523     \param aPlural Specifies the plural format of the translation.   
       
   524 */            
       
   525 EXPORT_C HBufC* HbTextResolverSymbian::LoadLC(const TDesC& aMessageId, const RArray<TInt>& aInts, TInt aPlural)
       
   526     {
       
   527     HbTextResolverSymbianPrivate* resolver = HbTextResolverSymbianPrivate::Instance();
       
   528     return resolver->LoadLC(aMessageId, aInts, aPlural);
       
   529     }
       
   530