Configuration for the client can be found in auth_config.json
.
{
"domain": "auth.plgd.cloud",
"clientID": "pHdCKhnpgGEtU7KAPcLYCoCAkZ4cYVZg",
"audience": "https://try.plgd.cloud",
"scope": "",
"httpGatewayAddress": "https://api.try.plgd.cloud"
}
npm install
npm start
Application will be hosted on http://localhost:3000
by default. To change the default port, put PORT=xxxx
into package.json
script for starting the development server
cross-env PORT=3000 craco start
or set PORT
into your environment variables.
npm run build
In order to add a new language, open the file config.js
and extend the supportedLanguages
array with additional values. Use the language code 2 for the language you are about to add:
supportedLanguages: ['en', 'sk']
Once you added a new language, open the file language-switcher-i18n.js
and add a new entry for the language you added. For example, for the language with code sk
the entry would look like this:
sk: {
id: 'language-switcher.slovak',
defaultMessage: 'Slovak',
},
For extracting the messages from the UI components, run the following script:
npm run generate-pot
This script will generate a template.pot
file, which contains all the strings from the application ready to be translated. Upload this file to your translation tool, translate the strings and after that, export the .po
files for all the translations and place them into i18n
folder.
For generating language files which are used by the application, run the following script:
npm run generate-language-files
Now your translations are updated and ready to be used.
The default language is set to be en
. This configuration can be overridden in config.js
by changing the defaultLanguage
field. Change this only to a language that is supported by the application (is present in the supportedLanguages
list).
After your first visit to the application from a browser, the application will remember the current language state. In order to change the defaultLanguage
field and see the change, you should clear the localStorage
entry language
from the browser.
plgd makes it simpler to build a successful IoT initiative – to create a proof of concept, evaluate, optimize, and scale.