Skip to content

Incorrect language.available values in config/config.php.dist #2214

@jaakristioja

Description

@jaakristioja

Specifics of your environment
SimpleSAMLphp 2.3.0

Describe the bug
In config/config.php.dist:

/*
* Languages available, RTL languages, and what language is the default.
*/
'language.available' => [
'en', 'no', 'nn', 'se', 'da', 'de', 'sv', 'fi', 'es', 'ca', 'fr', 'it', 'nl', 'lb',
'cs', 'sk', 'sl', 'lt', 'hr', 'hu', 'pl', 'pt', 'pt-br', 'tr', 'ja', 'zh', 'zh-tw',
'ru', 'et', 'he', 'id', 'sr', 'lv', 'ro', 'eu', 'el', 'af', 'zu', 'xh', 'st',
],

Note that the array contains strings like pt-br which are longer than the 2 characters as directed in the documentation:

## Multi-language support
To add support for a new language, add your new language to the `language.available` configuration parameter in `config.php`:
```php
/*
* Languages available and which language is default
*/
'language.available' => ['en', 'no', 'da', 'es', 'xx'],
'language.default' => 'en',
```
Please use the standardized two-character
[language codes as specified in ISO-639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).

To Reproduce
Steps to reproduce the behavior:

  1. cp config/config.php{.dist,}

Expected behavior
config.php.dist fixed not to contain such language.available values. Alternatively, adding support for such values.

Screenshots or logs

Errors in the logs.

ERROR [8be668a6db] Language "pt-br" not installed. Check config.
ERROR [8be668a6db] Language "zh-tw" not installed. Check config.
ERROR [8be668a6db] Language "pt-br" not installed. Check config.
ERROR [8be668a6db] Language "zh-tw" not installed. Check config.

I'm not entirely sure, but these errors in the logs seem to be a regression in comparison with SimpleSAMLphp version 2.2.2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions