Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

OpenSpecimen supports internationalization. To support this need to set locale in application. Locale configuration can be handled using REST APIinternationalisation. Based on the locale, the date formats specific to that country is automatically selected.

Configuration

...

Response

{
  "module": "common",
  "name": "locale",
  "value": "zh_CN"

...

By default OpenSpecimen has set en_US (English) locale. You can change it from the OpenSpecimen interface as a superadmin - Settings→Common→Locale. 

 

OR use following REST API URL to configure a locale.

http[s]:<host>:<port>/openspecimen/rest/ng/config-settings

Use HTTP PUT method to call this API by passing the below details in JSON format:

Parameter Details :

The user authentication API takes the following parameters in json request :

moduleModule name would be: common
name

Property name would be : locale

value

The actual value of the above specified property name.

Ex:

For English - en_US

For Chinese - zh_CN

 

Result:

The response of this request will contain the details of the configured locale property.

Below is the example to configure Chinese locale.

...

{
  "module": "common",
  "name": "locale",
  "value": "zh_CN"
}

, it is the system/host VM locale is used unless you override it using our configuration settings. So ideally as long as the OpenSpecimen is used in the same country as the VM's locale, you need not change this value.


If you want a different locale, you can change it as a super admin - Settings→Common→Locale. 


Image Added