ginebra/LocaleDelegate.cpp
branchGCC_SURGE
changeset 8 2e16851ffecd
parent 2 bf4420e9fa4d
parent 6 1c3b8676e58c
equal deleted inserted replaced
2:bf4420e9fa4d 8:2e16851ffecd
     1 /*
       
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <QString>
       
    20 //#include <QLocale>
       
    21 #include "chromeview.h"
       
    22 #include "LocaleDelegate.h"
       
    23 
       
    24 #include <qdebug.h>
       
    25 
       
    26 const QString JS_PREFIX = "txt_browser_";
       
    27 
       
    28 LocaleDelegate::LocaleDelegate(ChromeView* chrome)
       
    29 {   
       
    30     setObjectName("localeDelegate");
       
    31 }
       
    32 
       
    33 LocaleDelegate::~LocaleDelegate()
       
    34 {      
       
    35 }
       
    36 
       
    37 /*
       
    38 * Load the localized string based on the string id
       
    39 */
       
    40 QString LocaleDelegate::translateText(const QString & textToTranlsate) 
       
    41 {
       
    42     QString ret = tr((JS_PREFIX + textToTranlsate).toLatin1());
       
    43     qDebug() << "LocaleDelegate::translateText "  << ret;
       
    44     return ret;
       
    45 }