# Locale Settings

**URL:** <https://www.phphelp.com/t/locale-settings/18093>\
**Category:** PHP Installation and Configuration\
**Created:** [August 23, 2012, 12:07am UTC](https://www.phphelp.com/t/locale-settings/18093 "2012-08-23T00:07:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChristosTMG](https://www.phphelp.com/letter_avatar_proxy/v4/letter/c/ba8739/32.png) [@ChristosTMG](https://www.phphelp.com/u/ChristosTMG)\
**Post date:** [August 23, 2012, 12:07am UTC](https://www.phphelp.com/t/locale-settings/18093/1 "2012-08-23T00:07:48Z")

</div>

hello, how can i change settings for locales? for example i want to put in my php configuration file a code to change int\_frac\_digits and frac\_digits. Do you know how?

---

<div class="post-metadata">

**Author:** ![OpzMaster](https://www.phphelp.com/letter_avatar_proxy/v4/letter/o/a9adbd/32.png) [@OpzMaster](https://www.phphelp.com/u/OpzMaster)\
**Post date:** [August 23, 2012, 2:31am UTC](https://www.phphelp.com/t/locale-settings/18093/2 "2012-08-23T02:31:46Z")

</div>

Hello,

There’s a function called setlocale() that may be what you are looking for. The function goes like this:

[php]string setlocale ( int $category , string $locale [, string $…] )[/php]

[http://php.net/manual/en/function.setlocale.php](http://php.net/manual/en/function.setlocale.php) gives you more information about the function. Now, for a little extra, if you want to change something in your php.ini file, you would use the ini\_set() function which goes like this:

[php]string ini\_set ( string $varname , string $newvalue )[/php]

[http://php.net/manual/en/function.ini-set.php](http://php.net/manual/en/function.ini-set.php) give you more information about the function. Basically it sets the value of the given configuration option. The configuration option will keep this new value during the script’s execution, and will be restored at the script’s ending.

I hope I’ve been able to assist you with your issues.

Cheers!

Hope this helps!
