Skip to content

Use a language-country localization json file directly. #47

Closed
@Haixing-Hu

Description

@Haixing-Hu

In some cases, we want the website use a language-country localization json file directly, for example, "zh-CN" (means simplified Chinese) or "zh-TW" (means traditional Chinese).

But the current implementation will first try to load the localization json file with the language code (first two character of the "language" parameter), if it failed, the procedure stops.

For example, if we want to load "message-zh-CN.json", the current implementation will first try to load "message-zh.json", and if it failed, the program stops. This means we must provide an empty "message-zh.json", even if it is useless.

Therefore, the logic of the current implementation should be changed: if the program failed to load the json file with language code, it should continue to try to load the json file with the language-country code.

This issue may have some relation with the issue #22.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions