Skip to content

Commit

Permalink
Merge pull request #40 from deriv-com/feature/integrate-translations
Browse files Browse the repository at this point in the history
feature/translation
  • Loading branch information
sandeep-deriv authored Sep 3, 2024
2 parents 4646492 + daa00ba commit fc70b31
Show file tree
Hide file tree
Showing 212 changed files with 25,229 additions and 13,913 deletions.
27 changes: 15 additions & 12 deletions docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,34 @@ keywords:
description: Get an overview of the available Deriv API code examples and languages, and how to use it to create your trading app.
---

```mdx-code-block
import Link from '@docusaurus/Link';
import RenderOfficialContents from '@site/src/components/RenderOfficialContents';
```

Our Documentation is divided in several sections:

<RenderOfficialContents>
<ul>
<li>
<a href='category/core-concepts'>Core concepts</a>
<Link href='/docs/category/core-concepts'>Core concepts</Link>
</li>
<li>
<a href='category/code-examples'>Code examples</a>
<Link href='/docs/category/code-examples'>Code examples</Link>
</li>
<li>
<a href='category/languages'>Languages</a>
<Link href='/docs/category/languages'>Languages</Link>
</li>
<li>
<a href='category/guides'>Guides</a>
<Link href='/docs/category/guides'>Guides</Link>
</li>
<li>
<a href='setting-up-a-deriv-application'>Setting up a deriv app</a>
<Link href='/docs/setting-up-a-deriv-application'>Setting up a deriv app</Link>
</li>
</ul>
<ul>
<li>
<a href='category/code-examples'>Code examples</a>
<Link href='/docs/category/code-examples'>Code examples</Link>
</li>
</ul>
</RenderOfficialContents>
Expand All @@ -51,21 +54,21 @@ Our Documentation is divided in several sections:
</RenderOfficialContents>

<RenderOfficialContents>
Have a look at the <a href='/docs/category/core-concepts'>Core concepts</a> pages and take your
Have a look at the <Link href='/docs/category/core-concepts'>Core concepts</Link> pages and take your
time to read through it. These concepts will help you get familiar with our WebSocket server api
and how to use it more efficiently. They are not related to any of our frameworks or libraries.
</RenderOfficialContents>

<RenderOfficialContents>
When you read through the <a href='/docs/category/core-concepts'>Core concepts</a> page, you can
When you read through the <Link href='/docs/category/core-concepts'>Core concepts</Link> page, you can
start choosing your implementation approach based on the language, framework or library you want
to use in your application.
</RenderOfficialContents>

<h4>Code Examples</h4>

If you want to know how you can implement our API within your code, then we suggest to have a look
at our <a href='/docs/category/code-examples'>Code examples</a>. These code examples come in
at our <Link href='/docs/category/code-examples'>Code examples</Link>. These code examples come in
`CodeSandboxes`. This allows you to easily fork the code examples and experiment with them for
personal use. For now we only have JavaScript code examples, but, we plan to add more examples
that are created with different languages, frameworks and libraries in the near future.
Expand All @@ -76,7 +79,7 @@ that are created with different languages, frameworks and libraries in the near

<RenderOfficialContents>
When using our code examples, we also suggest to have a look at our{' '}
<a href='/docs/category/languages'>Languages</a> section. Here, we describe in detail how you
<Link href='/docs/category/languages'>Languages</Link> section. Here, we describe in detail how you
can setup your personal project properly to make use of our API. This will surely come helpful
when you try to integrate some of our code examples in your own project.
</RenderOfficialContents>
Expand All @@ -88,7 +91,7 @@ that are created with different languages, frameworks and libraries in the near
<RenderOfficialContents>
If you want to know for example how you can `monetize your application` or how to create a
`secure way for users to log in` to your application, then we provide a handful of{' '}
<a href='/docs/category/guides'>Guides</a> that can assist you with that.
<Link href='/docs/category/guides'>Guides</Link> that can assist you with that.
</RenderOfficialContents>

<RenderOfficialContents>
Expand All @@ -98,5 +101,5 @@ that are created with different languages, frameworks and libraries in the near
<RenderOfficialContents>
If you want to know more about the essentials that are needed to setup your own application,
then have a look at the{' '}
<a href='/docs/setting-up-a-deriv-application'>Setting up a Deriv application</a> section.
<Link href='/docs/setting-up-a-deriv-application'>Setting up a Deriv application</Link> section.
</RenderOfficialContents>
10 changes: 7 additions & 3 deletions docs/setting-up-a-deriv-application.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@ keywords:
description: A step-by-step guide on creating your Deriv API token and building your trading application with the help of our trading API. Learn more.
---

```mdx-code-block
import Link from '@docusaurus/Link';
```

#### Deriv account

If you don't have a Deriv account yet, you can easily create one by visiting our signup page or using the <a href="/api-explorer#new_account_virtual" target="_blank" rel="noopener noreferrer">new_account_virtual</a> API call. It's completely free. And if you have an account already, please log in using your account details. To avoid any accidental loss of funds during testing, we recommend using your demo account instead of a real account.
If you don't have a Deriv account yet, you can easily create one by visiting our signup page or using the <Link href="/api-explorer#new_account_virtual" target="_blank" rel="noopener noreferrer">new_account_virtual</Link> API call. It's completely free. And if you have an account already, please log in using your account details. To avoid any accidental loss of funds during testing, we recommend using your demo account instead of a real account.

To earn markup, get a Deriv real account to receive your monthly earnings. You can also create a real account using <a href="/api-explorer#new_account_real" target="_blank" rel="noopener noreferrer">new_account_real</a> or <a href="/api-explorer#new_account_maltainvest" target="_blank" rel="noopener noreferrer">new_account_maltainvest</a> API calls.
To earn markup, get a Deriv real account to receive your monthly earnings. You can also create a real account using <Link href="/api-explorer#new_account_real" target="_blank" rel="noopener noreferrer">new_account_real</Link> or <Link href="/api-explorer#new_account_maltainvest" target="_blank" rel="noopener noreferrer">new_account_maltainvest</Link> API calls.

:::caution
To create Deriv applications, you'll need an API token with the Admin scope for the account you wish to use for your application.
Expand All @@ -34,7 +38,7 @@ To create a new API token, follow these steps:
2. Provide a name for your token
3. Click **Create**

Alternatively, you can create an API token via the <a href="/api-explorer#api_token" target="_blank" rel="noopener noreferrer">api_token</a> API call.
Alternatively, you can create an API token via the <Link href="/api-explorer#api_token" target="_blank" rel="noopener noreferrer">api_token</Link> API call.

:::caution
You need a token with the `Admin` scope to create an application.
Expand Down
7 changes: 5 additions & 2 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const config = {
// If you aren't using GitHub pages, you don't need these.
organizationName: 'binary-com', // Usually your GitHub org/user name.
projectName: 'deriv-api-docs', // Usually your repo name.
trailingSlash: false,

customFields: {
trackJsToken: process.env.TRACKJS_TOKEN,
Expand All @@ -28,7 +27,7 @@ const config = {
// to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en', 'es', 'fr'],
locales: ['en', 'fr'],
localeConfigs: {
en: {
label: 'English',
Expand Down Expand Up @@ -124,6 +123,10 @@ const config = {
type: 'custom-user-navbar-item',
position: 'right',
},
{
type: 'localeDropdown',
position: 'right',
},
],
},
prism: {
Expand Down
234 changes: 234 additions & 0 deletions i18n/en/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -669,5 +669,239 @@
"theme.tags.tagsPageTitle": {
"message": "Tags",
"description": "The title of the tag list page"
},
"Deriv website": {
"message": "Deriv website"
},
"Who we are": {
"message": "Who we are"
},
"Contact us": {
"message": "Contact us"
},
"Only alphanumeric characters with spaces and underscores are allowed. (Example: my_application)": {
"message": "Only alphanumeric characters with spaces and underscores are allowed. (Example: my_application)"
},
"The name cannot contain “Binary”, “Deriv”, or similar words.": {
"message": "The name cannot contain “Binary”, “Deriv”, or similar words."
},
"Your website URL cannot exceed 255 characters.": {
"message": "Your website URL cannot exceed 255 characters."
},
"Enter a valid URL. (Example: https://www.[YourDomainName].com)": {
"message": "Enter a valid URL. (Example: https://www.[YourDomainName].com)"
},
"Your markup value cannot be more than 4 characters.": {
"message": "Your markup value cannot be more than 4 characters."
},
"Your markup value must be equal to or above 0.00 and no more than 3.00.": {
"message": "Your markup value must be equal to or above 0.00 and no more than 3.00."
},
"Using Deriv API to build a trading app with features like real-time pricing charts available on Dtrader.": {
"message": "Using Deriv API to build a trading app with features like real-time pricing charts available on Dtrader."
},
"Benefits of using Deriv API": {
"message": "Benefits of using Deriv API"
},
"Automation": {
"message": "Automation"
},
"Easy integration": {
"message": "Easy integration"
},
"Fast execution": {
"message": "Fast execution"
},
"A trading app created using Deriv API shown on a laptop.": {
"message": "A trading app created using Deriv API shown on a laptop."
},
"Personalise your trading": {
"message": "Personalise your trading"
},
"Personalise your trading apps to match your needs. Create charts and views the way you like them. Develop your trading app using any common programming language and extend your trading opportunities.": {
"message": "Personalise your trading apps to match your needs. Create charts and views the way you like them. Develop your trading app using any common programming language and extend your trading opportunities."
},
"Build a business and earn more": {
"message": "Build a business and earn more"
},
"Create your own trading apps by taking advantage of the power of Deriv's trading services. Share your apps with fellow traders or customers, and get a chance to earn more or build your own business.": {
"message": "Create your own trading apps by taking advantage of the power of Deriv's trading services. Share your apps with fellow traders or customers, and get a chance to earn more or build your own business."
},
"Name": {
"message": "Name"
},
"Token": {
"message": "Token"
},
"Scopes": {
"message": "Scopes"
},
"Last Used": {
"message": "Last Used"
},
"Valid for IP": {
"message": "Valid for IP"
},
"Update Application": {
"message": "Update Application"
},
"Register Application": {
"message": "Register Application"
},
"Your account": {
"message": "Your account"
},
"Choose your API token with the admin scope": {
"message": "Choose your API token with the admin scope"
},
"Application Name": {
"message": "Application Name"
},
"Application ID": {
"message": "Application ID"
},
"Redirect URL": {
"message": "Redirect URL"
},
"Actions": {
"message": "Actions"
},
"Only alphanumeric characters with spaces and underscores are allowed.": {
"message": "Only alphanumeric characters with spaces and underscores are allowed."
},
"The name can contain up to 48 characters.": {
"message": "The name can contain up to 48 characters."
},
"Duplicate token names aren’t allowed.": {
"message": "Duplicate token names aren’t allowed."
},
"Only alphanumeric characters with spaces and underscores are allowed": {
"message": "Only alphanumeric characters with spaces and underscores are allowed"
},
"Only 2-32 characters are allowed": {
"message": "Only 2-32 characters are allowed"
},
"No duplicate token names are allowed for the same account.": {
"message": "No duplicate token names are allowed for the same account."
},
"No keywords \"deriv\" or \"binary\" or words that look similar, e.g. \"_binary_\" or \"d3eriv\" are allowed.": {
"message": "No keywords \"deriv\" or \"binary\" or words that look similar, e.g. \"_binary_\" or \"d3eriv\" are allowed."
},
"Name your token and click on Create to generate your token.": {
"message": "Name your token and click on Create to generate your token."
},
"Token name (You've created {numberOfTokens} out of 30 tokens)": {
"message": "Token name (You've created {numberOfTokens} out of 30 tokens)"
},
"Create": {
"message": "Create"
},
"theme.docs.DocCard.categoryDescription.plurals": {
"message": "1 item|{count} items",
"description": "The default description for a category card in the generated index about how many items this category includes"
},
"theme.admonition.warning": {
"message": "warning",
"description": "The default label used for the Warning admonition (:::warning)"
},
"theme.DocSidebarItem.expandCategoryAriaLabel": {
"message": "Expand sidebar category '{label}'",
"description": "The ARIA label to expand the sidebar category"
},
"theme.DocSidebarItem.collapseCategoryAriaLabel": {
"message": "Collapse sidebar category '{label}'",
"description": "The ARIA label to collapse the sidebar category"
},
"theme.unlistedContent.title": {
"message": "Unlisted page",
"description": "The unlisted content banner title"
},
"theme.unlistedContent.message": {
"message": "This page is unlisted. Search engines will not index it, and only users having a direct link can access it.",
"description": "The unlisted content banner message"
},
"With our API, you'll be able to:": {
"message": "With our API, you'll be able to:"
},
"Yes, delete": {
"message": "Yes, delete"
},
"Delete token": {
"message": "Delete token"
},
"Are you sure you want to delete this token?": {
"message": "Are you sure you want to delete this token?"
},
"Delete app": {
"message": "Delete app"
},
"Are you sure you want to delete this app?": {
"message": "Are you sure you want to delete this app?"
},
"Update App": {
"message": "Update App"
},
"Your token name must be atleast 2 characters long.": {
"message": "Your token name must be atleast 2 characters long."
},
"Only up to 32 characters are allowed.": {
"message": "Only up to 32 characters are allowed."
},
"Nevermind": {
"message": "Nevermind"
},
"OK": {
"message": "OK"
},
"Token created successfully!": {
"message": "Token created successfully!"
},
"Please save this token key. For security reasons, it can't be viewed or copied again. If you lose this key, you'll need to generate a new token.": {
"message": "Please save this token key. For security reasons, it can't be viewed or copied again. If you lose this key, you'll need to generate a new token."
},
"Key": {
"message": "Key"
},
"You've created the maximum number of tokens.": {
"message": "You've created the maximum number of tokens."
},
"Deriv account": {
"message": "Deriv account"
},
"Log out": {
"message": "Log out"
},
"Documentation": {
"message": "Documentation"
},
"Dashboard": {
"message": "Dashboard"
},
"API explorer": {
"message": "API explorer"
},
"Deriv Tech": {
"message": "Deriv Tech"
},
"Bug bounty": {
"message": "Bug bounty"
},
"Homepage": {
"message": "Homepage"
},
"API": {
"message": "API"
},
"Deriv.com": {
"message": "Deriv.com"
},
"Telegram": {
"message": "Telegram"
},
"if you need any assistance or support.": {
"message": "if you need any assistance or support."
},
"Send an email": {
"message": "Send an email"
}
}
Loading

0 comments on commit fc70b31

Please sign in to comment.