]> BookStack Code Mirror - website/blob - content/docs/admin/language-config.md
a7e53e5024b4d6dc4e2557c41f4da010d3322f29
[website] / content / docs / admin / language-config.md
1 +++
2 title = "Language Configuration"
3 description = "Configuring the default language option for your BookStack instance"
4 date = "2018-08-11"
5 type = "admin-doc"
6 +++
7
8 By default the BookStack interface is shown in English. Additional languages are [supported
9 by the wider BookStack community](https://github.com/BookStackApp/BookStack#-translations). English translations may show as a fallback if a chosen
10 alternative language does not have fully up-to-date translations.  
11
12 ### Setting the Default Language
13
14 The value of the `APP_LANG` variable needs to be a valid locale code
15 The default language will be used as the default for logged-in users and also for
16 public users if their language cannot be auto-detected. This can be set
17  in your `.env` file as follows:
18
19 ```bash
20 # Sets application language to French
21 APP_LANG=fr
22 ```
23
24 The value of the `APP_LANG` variable must be a valid locale code matching one of the following options:
25
26 * Arabic - `ar`
27 * Bosnian - `bs`
28 * Bulgarian - `bg`
29 * Catalan - `ca`
30 * Chinese (Simplified) - `zh_CN`
31 * Chinese (Traditional) - `zh_TW`
32 * Croatian - `hr`
33 * Czech - `cs`
34 * Danish - `da`
35 * Dutch - `nl`
36 * English - `en`
37 * French - `fr`
38 * German (Formal) - `de`
39 * German (Informal) - `de_informal`
40 * Hebrew - `he`
41 * Hungarian - `hu`
42 * Indonesian - `id`
43 * Italian - `it`
44 * Japanese - `ja`
45 * Korean - `ko`
46 * Latvian - `lv`
47 * Lithuanian - `lt`
48 * Norwegian Bokmal - `nb`
49 * Persian - `fa`
50 * Polish - `pl`
51 * Portuguese - `pt_PT`
52 * Brazilian Portuguese - `pt_BR`
53 * Russian - `ru`
54 * Slovak - `sk`
55 * Slovenian - `sl`
56 * Spanish - `es_ES`
57 * Argentinian Spanish - `es_AR`
58 * Swedish - `sv`
59 * Turkish - `tr`
60 * Ukrainian - `uk`
61 * Vietnamese - `vi`
62
63 ### Public User Locale Autodetection
64
65 For users that are not logged-in BookStack will try to detect their language
66 based off of information sent from their browser. If you'd prefer to force
67 the language seen to be the `APP_LANG` setting you can set the following
68 in your `.env` file:
69
70 ```bash
71 APP_AUTO_LANG_PUBLIC=false
72 ```
73
74 ### Localised Date Formatting
75
76 BookStack does support the localisation of date formats but it does depend on the intended locales being installed
77 on the host system. If using ubuntu, you can manage installed locales via the command:
78
79 ```bash
80 sudo dpkg-reconfigure locales
81 ```
82
83 For other operating systems this may be different. After installing new locales you may need to restart any running PHP processes.
84 For example, On Ubuntu, running PHP 7.4:
85
86 ```bash
87 sudo systemctl restart php7.4-fpm.service 
88 ```