# how to set locale for es_PE.UTF-8



## guzh (Aug 9, 2018)

First, sorry for my English isn't good.

I looking for localization to set  es_PE.UTF-8 on FreeBSD 11.2-p1, how do I do it?
On the terminal I run `locale -a | grep es_` and I just only got this 

```
es_AR.ISO8859-1
es_AR.UTF-8
es_CR.UTF-8
es_ES.ISO8859-1
es_ES.ISO8859-15
es_ES.UTF-8
es_MX.ISO8859-1
es_MX.UTF-8
```
When I installed PostgreSQL 9.5 on Windows 7 the configuration for locale was

```
LC_COLLATE = 'Spanish_Peru.1252'
LC_CTYPE = 'Spanish_Peru.1252'
```
I understand that pattern is code_language.code_country.encoding, and the localization are taken from OS, so the question is how to set locale for language Spanish, country Peru on FreeBSD 11.2-p1?

Thanks.


----------



## ShelLuser (Aug 10, 2018)

There is a huge difference between the localization on the console or that within application such as PostgreSQL, those don't necessarily have to be related. I also don't really understand the problem: didn't you set up a locale during the installation?

Even so: chapter 22 of the FreeBSD handbook might help, that covers localization. 

For the record, the handbook is also available in Spanish, see this link.

Even so, PostgreSQL localization does not necessarily have to rely on the underlying OS, you can also set this up manually. See Chapter 22 of the PostgreSQL handbook.


----------



## guzh (Dec 15, 2018)

ShelLuser
Thanks for answer

So, you try to saying me that the locale in postgresql could be different to os?

For Example:
In postgresql I have locale es_PE.UTF-8
In FreeBSD I have locale: C or anyother

Is that correct?
If that is right, someone could help me to set locale for postgresql for specific locale like this: 
es_PE.UTF-8

Thanks


----------



## SirDice (Dec 17, 2018)

guzh said:


> If that is right, someone could help me to set locale for postgresql for specific locale like this:


https://www.postgresql.org/docs/9.5/locale.html


----------

