---
title: "Locale"
type: "forum-thread"
url: "https://www.webforum.nu/amne/php/163884-locale"
topic: "PHP"
topic_url: "https://www.webforum.nu/amne/php"
author: "bluespot"
published: "2007-08-26T11:31:31.000Z"
updated: "2007-08-27T14:08:29.000Z"
replies: 1
views: 341
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/php/163884-locale"
---

# Locale

## #1 — bluespot, 2007-08-26T11:31Z

Hur ändrar jag detta till svenska?

```
// Locale
$_['code']              = 'en';
$_['charset']           = 'utf-8';
$_['direction']         = 'ltr';
$_['locale']            = 'en_US.UTF-8,en_US,english';
$_['date_format_short'] = 'j F Y';
$_['date_format_long']  = 'l dS F Y';
$_['time_format']       = 'h:i:s A';
$_['decimal_point']     = '.';
$_['thousand_point']    = ',';
```

Permalänk: https://www.webforum.nu/p/163884

## #2 — Troxy, 2007-08-27T14:08Z

Det borde väl bli något sånt här:

```
// Locale
$_['code']              = 'sv';
$_['charset']           = 'utf-8';
$_['direction']         = 'ltr';
$_['locale']            = 'sv_SE.UTF-8,sv_SE,swedish';
$_['date_format_short'] = 'j F Y';
$_['date_format_long']  = 'l dS F Y';
$_['time_format']       = 'h:i:s A';
$_['decimal_point']     = ',';
$_['thousand_point']    = ' ';
```

Datumformaten kan du ändra så det passar själv.
Jag gissar att formatet används för date()-funktionen:
<http://se.php.net/manual/en/function.date.php>

Permalänk: https://www.webforum.nu/p/2020190

---

Tråden på webben: https://www.webforum.nu/amne/php/163884-locale
