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
1 answer

Can I use setlocale() and isalpha() to determine if character belongs to alphabet of current locale?

Is it possible to do setlocale(LC_CTYPE, "ru_RU.utf8") and for each symbol of string "рус eng" do isaplha() check and to get as result following: р alpha у alpha с alpha not alpha e not alpha n not alpha g not alpha now when I am setting locale…
dmigous
  • 167
  • 1
  • 3
  • 14
0
votes
1 answer

setlocale is not always being set (intermittently working correctly)

I'm using PHP's setlocale(LC_TIME, country) to set a server's locale temporarily to Spanish (es_ES.utf8) or french (fr_FR.utf8). I then use strftime() to print out a date in the selected locale's language. After testing setlocale by refreshing the…
Mark Purnell
  • 181
  • 2
  • 10
0
votes
0 answers

How to use toUpperCase for Pinyin?

I want to use toUpperCase() for a set of JButtons. These buttons are added to a JPanel, which is added to a JDialog. The buttons' texts are pinyin sepcial characters. The problem is, that toUpperCase relies on the set Locale and doesn't know the…
Zelphir Kaltstahl
  • 5,722
  • 10
  • 57
  • 86
0
votes
1 answer

date arabic & french codeigniter PHP5

I've a problem with date language can't displaying it in arabic neither french ..i've tried all syntaxes possible , it seems that setlocale doesnt work ,any help will be appreciated setlocale(LC_TIME, 'fr_FR.UTF8', 'fr.UTF8', 'fr_FR.UTF-8',…
Hasnae Idem
  • 39
  • 1
  • 10
-1
votes
1 answer

How to load a json file based on locale of the browser in angular1.x?

In my project the selection of browser locale I want to change the date format, how can I get the date format according to the locale in javascript or angularjs
-1
votes
1 answer

Issue with Laravel 5.2 and His non-persistent App SetLocale over http://

Can anyone point me in the right direction when trying to troubleshoot this web app (Dorothea Special School) I created a few years back using this link Laravel 5 And His F*cking non-persistent App SetLocale If I can recall it was working perfectly…
Tim Kruger
  • 863
  • 2
  • 10
  • 26
-1
votes
1 answer

Unable to use gettext to retrieve the translated string in .mo files

I'm trying to setup a clean environment to test php's gettext with. I forked from one of the example and started there, but failed to get it work: https://github.com/yookoala/gettext-example (If needed, please clone the source code and test…
Koala Yeung
  • 7,475
  • 3
  • 30
  • 50
-1
votes
1 answer

setLocale for reading float numbers from string

I work on Ubuntu and use an english keyboard.When I want to parse float from string in cpp using "strtof" function it is assuming commas, instead of dots as floating point. As a known solution I tried to use setlocale(LC_NUMERIC, "C") however this…
in4001
  • 656
  • 6
  • 24
-1
votes
1 answer

It seems setlocale() doesn't work in a linked library

#include #include #include "mainwindow.hpp" #include "../RegisterOfErrors.hpp" #include extern std::string* Error::DescriptionOfErrors; int main (int argc, char *argv[]) { …
godlark
  • 157
  • 7
1 2 3
16
17