Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions docs/Configuration/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,32 @@ LANGS=en_GB # Available languages
SYSTEM_DEFAULTLOCALE=en-GB # Default language
```

**How language selection works:**

Stirling-PDF determines the interface language using this priority order:

1. **User's manual selection** (highest priority)
- When a user clicks the language globe icon and selects a language
- Choice is stored in browser's localStorage (persists across sessions)
- Storage key: `i18nextLng`

2. **Browser's language preference**
- Automatically detected from browser's `Accept-Language` header via the `navigator` API
- Example: Firefox set to Swedish (sv-SE) will show Swedish UI

3. **System default locale** (lowest priority)
- Set via `SYSTEM_DEFAULTLOCALE` or `system.defaultLocale`
- Only applied if user has no localStorage preference (first-time visitors)

**Example:**
- Config: `SYSTEM_DEFAULTLOCALE=en_GB`
- Browser: Swedish (sv-SE)
- Result: UI shows Swedish (browser preference overrides config)

To force a specific default language regardless of browser settings, users must manually select it via the language globe icon.

> 💡 **Tip**: Set `SYSTEM_DEFAULTLOCALE` to your organization's primary language. Users can always override it using the language selector in the top-right corner.

### Deployment Mode

```bash
Expand Down
10 changes: 5 additions & 5 deletions docs/Configuration/External Database.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ You can configure the new `Datasource` property in your `settings.yml` to connec
```yaml
datasource:
enableCustomDatabase: false
customDatabaseUrl: jdbc:postgresql://localhost:5432/postgres
customDatabackendUrl: jdbc:postgresql://localhost:5432/postgres
username: postgres
password: postgres
type: postgresql
Expand All @@ -36,7 +36,7 @@ You can configure the new `Datasource` property in your `settings.yml` to connec
```

- `enableCustomDatabase`: Set this property to `true` to enable use of the custom database **Note: An enterprise license to use this feature**
- `customDatabaseUrl`: Enter the database connection url for the database here. **Note: If you set the `customDatabaseUrl` you do not need to set the type, hostName, port and name, they will all be automatically derived from the url.**
- `customDatabackendUrl`: Enter the database connection url for the database here. **Note: If you set the `customDatabackendUrl` you do not need to set the type, hostName, port and name, they will all be automatically derived from the url.**
- `username`: The username for the database
- `password`: The password for the database

Expand Down Expand Up @@ -80,7 +80,7 @@ services:
environment:
DISABLE_ADDITIONAL_FEATURES: "false" "true"
SYSTEM_DATASOURCE_ENABLECUSTOMDATABASE: "true"
SYSTEM_DATASOURCE_CUSTOMDATABASEURL: "jdbc:postgresql://db:5432/stirling_pdf"
SYSTEM_DATASOURCE_CUSTOMDATABACKENDURL: "jdbc:postgresql://db:5432/stirling_pdf"
SYSTEM_DATASOURCE_USERNAME: "admin"
SYSTEM_DATASOURCE_PASSWORD: "stirling"
# further configuration
Expand All @@ -89,7 +89,7 @@ services:
- `depends_on`: This specifies any services that your app will need in order to run. Ensure the name matches the container name for your database
- `DISABLE_ADDITIONAL_FEATURES`: Set this to `false` to enable security features
- `SYSTEM_DATASOURCE_ENABLECUSTOMDATABASE`: An environment variable to connect to the database container. Set this to `true` to enable use of the external database
- `SYSTEM_DATASOURCE_CUSTOMDATABASEURL`: An environment variable to connect to the database container. Set the connection url for the database here. **Note: If you set this url you do not need to set the type, hostName, port and name (namely `SYSTEM_DATASOURCE_TYPE`, `SYSTEM_DATASOURCE_HOSTNAME`, `SYSTEM_DATASOURCE_PORT`, `SYSTEM_DATASOURCE_NAME`), they will all be automatically derived from the url.**
- `SYSTEM_DATASOURCE_CUSTOMDATABACKENDURL`: An environment variable to connect to the database container. Set the connection url for the database here. **Note: If you set this url you do not need to set the type, hostName, port and name (namely `SYSTEM_DATASOURCE_TYPE`, `SYSTEM_DATASOURCE_HOSTNAME`, `SYSTEM_DATASOURCE_PORT`, `SYSTEM_DATASOURCE_NAME`), they will all be automatically derived from the url.**
- `SYSTEM_DATASOURCE_USERNAME`: An environment variable to connect to the database container. Set the username for the database. Ensure this matches the corresponding property in your database container
- `SYSTEM_DATASOURCE_PASSWORD`: An environment variable to connect to the database container. Set the password for the database. Ensure this matches the corresponding property in your database container

Expand All @@ -103,7 +103,7 @@ services:
environment:
DISABLE_ADDITIONAL_FEATURES: "false" "true"
SYSTEM_DATASOURCE_ENABLECUSTOMDATABASE: "true"
SYSTEM_DATASOURCE_CUSTOMDATABASEURL: "jdbc:postgresql://db:5432/stirling_pdf"
SYSTEM_DATASOURCE_CUSTOMDATABACKENDURL: "jdbc:postgresql://db:5432/stirling_pdf"
SYSTEM_DATASOURCE_USERNAME: "admin"
SYSTEM_DATASOURCE_PASSWORD: "stirling"
# further configuration
Expand Down
Loading