Results 1 to 1 of 1

Thread: Localization - shortDayName - Raspberry Pi

  1. #1
    Join Date
    Jun 2008
    Posts
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Localization - shortDayName - Raspberry Pi

    Hello,

    I'm using a Mac to develop a Qt application for Raspberry Pi.

    In my software I'm doing QString dateCurrentString = dt.toString(QString("ddd dd MMM yyyy"));
    so, using "ddd" I'm calling QDate::shortDayName which is a localized function.

    The problem is that my software is running fine (with french localized short day name) on my Mac.
    But on the Raspberry Pi, I have an english short day name.

    I don't know what Qt use to "know" which locale I need.

    I tried on the Raspberry Pi to fix it by using raspi-config and set local (with
    "change_local" menu) to fr_FR.UTF-8
    I verified by using this command line :
    $ echo $LANG
    fr_FR.UTF-8

    but my software is always in english

    so maybe I forget to set something else.

    Kind regards

    Sébastien


    Added after 51 minutes:


    I started my software after setting this environment variable :
    export LC_ALL=$LANG

    and now it's working fine...

    that's really strange because according to
    http://qt-project.org/wiki/QtLocales...fdb0ed8e8fd848
    On Linux, query() returns only the measurement system by inspecting the LC_MEASUREMENT, LC_ALL and LANG environment variables (in that order).

    LC_MEASUREMENT and LC_ALL were empty strings so my software should use LANG... but this doesn't not seem to be the case!
    Last edited by scls19fr; 25th October 2012 at 18:18.

Similar Threads

  1. Localization of library
    By realdarkman71 in forum Newbie
    Replies: 0
    Last Post: 27th May 2012, 20:09
  2. Replies: 2
    Last Post: 23rd May 2011, 10:21
  3. Qt/Mac : Localization of Application Menu gone after "macdeployqt"
    By menz in forum Installation and Deployment
    Replies: 0
    Last Post: 6th April 2011, 17:37
  4. Localization for dynamically generated text.
    By vaibhav in forum Qt Programming
    Replies: 10
    Last Post: 14th March 2011, 12:03
  5. Real Time Localization System
    By oswalidos in forum General Programming
    Replies: 3
    Last Post: 22nd September 2009, 20:50

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.