Questions tagged [setlocale]

The setlocale() is a function that is used to configure and specify certain locale information.

The setlocale() is a function that is used to configure and specify certain locale category information. Such locale categories can be:

  • LC_ALL
  • LC_COLLATE
  • LC_CTYPE
  • LC_MONETARY
  • LC_NUMERIC
  • LC_TIME
  • LC_MESSAGES

Additionally, the locale must be specified. The locale is actually the universal locale code of the currently language.

The possible locale and category values are specified in RFC 1766 and ISO 639.

249 questions
0
votes
0 answers

Setting Locale independeant of language for web application ( JSF )

i m giving user ability to choose locale (say en_US and en_UK) . and i want to see date and amount fields with respect to locale foe whole application. no hard (coded strings). can u please tell me how to do that . how to set locale for user in…
0
votes
1 answer

The locale is not updated in my library for android app

I have a project which has the core and also a library I change my locale in run time in my core project. The problem is , in the library project there is a Locale.getDefault(); which only return the locale of the device but not the locale of…
user3538235
  • 1,991
  • 6
  • 27
  • 55
0
votes
0 answers

default locale used for Windows C++ program

Has anyone ever seen a program use the Windows OS native locale by default instead of 'C' locale (the program is C++)? I have a C++ program which, when converting a double into a string, will replace all decimal symbols (which were originally…
Fractal
  • 1,748
  • 5
  • 26
  • 46
0
votes
3 answers

PHP setlocale does not work for Korean language

I am currently using date function to print out today's date. While doing this, I realized that the setlocale function does not work for Korean unfortunately so I am now wondering is there any way to directly translate from English to Korean through…
wordwannabe
  • 103
  • 1
  • 10
0
votes
1 answer

How to set the locale code in sending email

I created an email template of abandoned applications, when I send an email check the store's order to send properly, but now lack the language set to go all correctly. Example: $order =…
Dexxtz
  • 570
  • 5
  • 22
0
votes
1 answer

DateTime locale string not change even I changed the locale in app in android

In my android app, I have successfully implemented the language change part. The problem is, the DateTime locale is based on the device locale but not the in app locale, for example, when I switch in app locale from English to Germany, while the…
user3538235
  • 1,991
  • 6
  • 27
  • 55
0
votes
2 answers

Translating PHP $get_month from english to swedish

I have a blog archive that's in English and I want the month to display in Swedish instead. I've searched and tried answers to similar problems, but nothing is working. Can someone please help?
0
votes
1 answer

Setlocale in a cron job

I have a cron job creating dynamic files and sending emails to system users. I need to set the language within the cron job so gettext and date formats work when creating the dynamic emails. I cannot set the LANG in the /etc/environment file…
Jennifer
  • 158
  • 5
0
votes
1 answer

how can I know file's locale?

I want to read a file(like .txt) and do std::cout. but if the file's locale doesn't same with my system's locale, it will print weird. this is my question. how can I know the file's locale? if I can get file's locale, I can change system's locale…
Kim
  • 1
0
votes
1 answer

Silverstripe event calendar (MonthJumper): showing months in German don't work

I have a problem with the month names in MonthJumper in the Silverstripe Event Calendar. I want the months to display in German. I tried the following code in my _config.php: i18n :: set_locale ('en_US'); setlocale (LC_ALL, 'de_DE @ euro',…
iraira
  • 315
  • 2
  • 13
0
votes
0 answers

POSIX locale for different unicode scripts to use with Boost

I am using Boost Ofstream for Unicode std::string output. I am stuck with using the right locale (Boost)/ Encoding to support all the languages (in all the Unicode versions upto 6.3). The code is targeted to compile on both VS2010 and GCC…
ProgramCpp
  • 1,280
  • 2
  • 15
  • 26
0
votes
1 answer

Why can't I set arabic locale (like "ar_SA") on Mac OSX

When I call setlocale(LC_ALL, "ar_SA"), it returns "C". Even I'm expecting it returns "ar_SA". If setlocale(LC_ALL, "ar_SA") is successful, it'll return "ar_SA". I found the reason. There is no "ar_SA" locale directory in /usr/share/locale of my Mac…
Raymond
  • 473
  • 3
  • 18
0
votes
3 answers

troubles with PHP setlocale and iso-8859-1 encoding

I have created a website using iso-8859-1 encoding, and I want to display the date in French. Here is the file I use for test :
EMG
  • 101
  • 2
  • 3
  • 10
0
votes
1 answer

How to trigger MinGW to link "msvcr100.dll" instead of the "msvcr.dll" within the "libstdc++.dll" and "libgcc_s_dw2-1.dll"`?

Platform: Windows XP; MingGW with (gcc v.4.7.2) As stated in the topic, how can I achive this? Why? I determine a crash of my multi-threaded application on Windowx XP, in case I compile the application with MinGW. According to the backtrace, the…
Regina Balusz
  • 91
  • 2
  • 11
0
votes
2 answers

Specify the language in a website

how should I set the locale in my site? I mean, in a test for websites it says I'm not setting the language.. I tried with html this way: but someone said is not the way, even the test still says…
tirenweb
  • 30,963
  • 73
  • 183
  • 303
1 2 3
16
17