]> BookStack Code Mirror - website/blob - content/docs/admin/language-config.md
Actualiser content/docs/admin/installation.md
[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 * Basque - `eu`
28 * Bosnian - `bs`
29 * Bulgarian - `bg`
30 * Catalan - `ca`
31 * Chinese (Simplified) - `zh_CN`
32 * Chinese (Traditional) - `zh_TW`
33 * Croatian - `hr`
34 * Czech - `cs`
35 * Danish - `da`
36 * Dutch - `nl`
37 * English - `en`
38 * French - `fr`
39 * German (Formal) - `de`
40 * German (Informal) - `de_informal`
41 * Hebrew - `he`
42 * Hungarian - `hu`
43 * Indonesian - `id`
44 * Italian - `it`
45 * Japanese - `ja`
46 * Korean - `ko`
47 * Latvian - `lv`
48 * Lithuanian - `lt`
49 * Norwegian Bokmal - `nb`
50 * Persian - `fa`
51 * Polish - `pl`
52 * Portuguese - `pt_PT`
53 * Brazilian Portuguese - `pt_BR`
54 * Russian - `ru`
55 * Slovak - `sk`
56 * Slovenian - `sl`
57 * Spanish - `es`
58 * Argentinian Spanish - `es_AR`
59 * Swedish - `sv`
60 * Turkish - `tr`
61 * Ukrainian - `uk`
62 * Vietnamese - `vi`
63
64 ### Public User Locale Autodetection
65
66 For users that are not logged-in BookStack will try to detect their language
67 based off of information sent from their browser. If you'd prefer to force
68 the language seen to be the `APP_LANG` setting you can set the following
69 in your `.env` file:
70
71 ```bash
72 APP_AUTO_LANG_PUBLIC=false
73 ```
74
75 ### Localised Date Formatting
76
77 BookStack does support the localisation of date formats but it does depend on the intended locales being installed
78 on the host system. If using ubuntu, you can manage installed locales via the command:
79
80 ```bash
81 sudo dpkg-reconfigure locales
82 ```
83
84 For other operating systems this may be different. After installing new locales you may need to restart any running PHP processes.
85 For example, On Ubuntu, running PHP 7.4:
86
87 ```bash
88 sudo systemctl restart php7.4-fpm.service 
89 ```