diff --git a/docusaurus.config.js b/docusaurus.config.js index 763a13a7..4f384e7d 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -27,7 +27,12 @@ const config = { // to replace "en" with "zh-Hans". i18n: { defaultLocale: 'en', - locales: ['en'], + locales: ['en', 'es', 'fr'], + localeConfigs: { + th: { + label: 'Thai', + }, + }, }, plugins: [ @@ -118,6 +123,10 @@ const config = { type: 'custom-user-navbar-item', position: 'right', }, + { + type: 'localeDropdown', + position: 'right', + }, ], }, prism: { diff --git a/src/components/Footer/index.tsx b/src/components/Footer/index.tsx index 0f10b85a..88d84dc8 100644 --- a/src/components/Footer/index.tsx +++ b/src/components/Footer/index.tsx @@ -1,16 +1,17 @@ import React from 'react'; import { Text } from '@deriv/ui'; import styles from './Footer.module.scss'; +import Translate from '@docusaurus/Translate'; const Footer = () => { return ( diff --git a/src/features/Apiexplorer/Dropdown/DropdownList/index.tsx b/src/features/Apiexplorer/Dropdown/DropdownList/index.tsx index 8f09fd8b..afef61cd 100644 --- a/src/features/Apiexplorer/Dropdown/DropdownList/index.tsx +++ b/src/features/Apiexplorer/Dropdown/DropdownList/index.tsx @@ -2,6 +2,7 @@ import React from 'react'; import { playground_requests } from '@site/src/utils/playground_requests'; import clsx from 'clsx'; import styles from './DropdownList.module.scss'; +import Translate from '@docusaurus/Translate'; type TDropdownList = { selected: string; @@ -34,10 +35,14 @@ const DropdownList = ({ />
- Select API Call - Version 3 + + Select API Call - Version 3 +
- ALL CALLS + + ALL CALLS +
{playground_requests .filter((option) => { diff --git a/src/features/Apiexplorer/LoginDialog/index.tsx b/src/features/Apiexplorer/LoginDialog/index.tsx index 58ca74e2..eb58c9ef 100644 --- a/src/features/Apiexplorer/LoginDialog/index.tsx +++ b/src/features/Apiexplorer/LoginDialog/index.tsx @@ -2,6 +2,7 @@ import React, { useCallback } from 'react'; import { Modal, Button } from '@deriv/ui'; import useLoginUrl from '@site/src/hooks/useLoginUrl'; import styles from './LoginDialog.module.scss'; +import Translate from '@docusaurus/Translate'; type TLoginDialog = { setToggleModal: React.Dispatch>; @@ -36,21 +37,25 @@ export const LoginDialog = ({ setToggleModal }: TLoginDialog) => { >

- This API call must be authorised because it requires access to your account - information. + + This API call must be authorised because it requires access to your account + information. +

- Log in to your Deriv account to proceed. If you don’t have a Deriv account, sign up - first. + + Log in to your Deriv account to proceed. If you don’t have a Deriv account, sign + up first. +

diff --git a/src/features/Apiexplorer/RequestJSONBox/index.tsx b/src/features/Apiexplorer/RequestJSONBox/index.tsx index 495ac3aa..ca5b9f59 100644 --- a/src/features/Apiexplorer/RequestJSONBox/index.tsx +++ b/src/features/Apiexplorer/RequestJSONBox/index.tsx @@ -1,10 +1,11 @@ import { TSocketEndpointNames } from '@site/src/configs/websocket/types'; import clsx from 'clsx'; -import React, { useEffect, useMemo, useState } from 'react'; +import React, { useMemo } from 'react'; import RequestResponseRenderer from '../RequestResponseRenderer'; import style from './RequestJSONBox.module.scss'; import SubscribeRenderer from '../SubscribeRenderer'; import { TSocketSubscribableEndpointNames } from '@site/src/configs/websocket/types'; +import Translate from '@docusaurus/Translate'; interface TRequestJSONBox { handleChange: React.ChangeEventHandler; @@ -27,7 +28,7 @@ function RequestJSONBox({