diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 56812af3..11d0b361 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -1,77 +1,29 @@ -import {defineConfigWithTheme} from 'vitepress' -import type {ThemeConfig} from 'vitepress-carbon' +import { defineConfigWithTheme } from 'vitepress' +import type { ThemeConfig } from 'vitepress-carbon' import baseConfig from 'vitepress-carbon/config' +import { version } from '../package.json' +import { sidebar } from './sidebar.mjs' -const nav = [ +const nav: NavItem[] = [ { - text: 'Docs', + text: 'Guide', activeMatch: `^/(guide|examples)/`, items: [ - {text: 'Guide', link: '/guide/introduction'}, - {text: 'Examples', link: '/examples/'}, - {text: 'Error Reference', link: '/error-reference/'}, - {text: 'JavaDoc', link: 'https://brenoepics.github.io/at4j/javadoc/'} + { text: 'Introduction', link: '/guide/introduction' }, + { text: 'Examples', link: '/examples/' }, + { text: 'Error Reference', link: '/error-reference/' } ] }, { - text: 'About', - activeMatch: `^/about/`, - items: [ - {text: 'FAQ', link: '/about/faq'}, - {text: 'Releases', link: '/about/releases'}, - {text: 'Code of Conduct', link: '/about/coc'} - ] + text: `JavaDoc`, + link: 'https://brenoepics.github.io/at4j/javadoc/' }, + { + text: 'v' + version, + activeMatch: '^/$', + link: 'https://github.com/brenoepics/at4j/releases' + } ] -const sidebar = { - '/guide/': [ - { - text: 'Getting Started', - items: [ - {text: 'Introduction', link: '/guide/introduction'}, - { - text: 'Download/Installation', - link: '/guide/installation' - }, - { - text: `Generating an Azure Translator Key`, - link: '/guide/azure-subscription' - }, - { - text: 'Basic Usage', - link: '/guide/basic-usage' - }, - { - text: 'Threading', - link: '/guide/threading' - }, - { - text: 'Examples', - link: '/examples/' - } - ] - } - ], - '/examples/': [ - { - text: 'Basic', - items: [ - { - text: 'Translate Hello World', - link: '/examples/#translator' - }, - { - text: 'Detect Language', - link: '/examples/#detect' - }, - { - text: 'Guide', - link: '/guide/introduction' - } - ] - } - ] -} // https://vitepress.dev/reference/site-config export default defineConfigWithTheme({ @@ -92,10 +44,11 @@ export default defineConfigWithTheme({ } }, head: [ - ['meta', {name: 'theme-color', content: '#3c8772'}], - ['meta', {property: 'og:url', content: 'https://github.com/brenoepics/at4j'}], - ['meta', {property: 'og:type', content: 'Repository'}], - ['meta', {property: 'og:title', content: 'AT4J'}], + ['link', { rel: 'icon', href: '/at4j/favicon.svg' }], + ['meta', { name: 'theme-color', content: '#0089D3' }], + ['meta', { property: 'og:url', content: 'https://github.com/brenoepics/at4j' }], + ['meta', { property: 'og:type', content: 'Repository' }], + ['meta', { property: 'og:title', content: 'AT4J' }], [ 'meta', { @@ -104,11 +57,15 @@ export default defineConfigWithTheme({ } ] ], - themeConfig: { nav, sidebar, + logo: { + alt: 'AT4J Logo', + src: '/favicon.svg' + }, + search: { provider: 'algolia', options: { @@ -127,7 +84,7 @@ export default defineConfigWithTheme({ }, link: 'https://www.postman.com/maintenance-astronaut-2993290/workspace/brenoepics/collection/18589822-dfe7a640-9b94-47a8-b19f-46cb9cc8843e?action=share&creator=18589822' }, - {icon: 'github', link: 'https://github.com/brenoepics/at4j'} + { icon: 'github', link: 'https://github.com/brenoepics/at4j' } ], editLink: { @@ -138,5 +95,5 @@ export default defineConfigWithTheme({ footer: { message: 'Apache 2.0 Licensed' } - }, + } }) diff --git a/docs/.vitepress/sidebar.mts b/docs/.vitepress/sidebar.mts new file mode 100644 index 00000000..68921879 --- /dev/null +++ b/docs/.vitepress/sidebar.mts @@ -0,0 +1,85 @@ + +import type { DefaultTheme } from 'vitepress' + + +const guideGroupItems: DefaultTheme.NavItem[] = [ + { + text: 'Introduction', + link: '/guide/introduction' + }, + { + text: 'Installation', + link: '/guide/installation' + }, + { + text: 'Basic Usage', + link: '/guide/basic-usage' + } +] + +const examplesItems: DefaultTheme.NavItem[] = [ + { + text: 'Translator', + link: '/examples/#translator' + }, + { + text: 'Detect', + link: '/examples/#detect' + }, + { + text: 'Translate JSON', + link: '/examples/#json' + } +] + +const essentialItems: DefaultTheme.NavItem[] = [ + { + text: 'Completable Futures', + link: '/essential/completable-futures' + }, + { + text: 'Optionals', + link: '/essential/optionals' + }, + { + text: 'Error Handling', + link: '/essential/error-handling' + }, + { + text: 'Logging', + link: '/essential/logging' + } +] + +const azureItems: DefaultTheme.NavItem[] = [ + { + text: 'Azure Subscription', + link: '/guide/azure-subscription' + }, + { + text: 'Available Languages', + link: '/azure-reference/languages' + }, + { + text: 'Error Reference', + link: '/error-reference/' + } +] + +const advancedItems: DefaultTheme.NavItem[] = [ + { + text: 'Threading', + link: '/advanced/threading' + }, + { + text: 'Caching', + link: '/advanced/caching' + } +] +export const sidebar: DefaultTheme.Sidebar = [ + { text: 'Guide', items: guideGroupItems }, + { text: 'Essential Knowledge', collapsed: true, items: essentialItems }, + { text: 'Examples', collapsed: true, items: examplesItems }, + { text: 'Advanced Usage', collapsed: true, items: advancedItems }, + { text: 'Azure Reference', collapsed: true, items: azureItems }, +] diff --git a/docs/package.json b/docs/package.json index 9a3da184..aa6036f4 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,6 +1,6 @@ { "name": "at4j-docs", - "version": "1.0.0", + "version": "1.2.0", "description": "Azure Translator for Java docs", "scripts": { "dev": "vitepress dev", @@ -8,6 +8,6 @@ "preview": "vitepress preview" }, "dependencies": { - "vitepress-carbon": "^1.3.1" + "vitepress-carbon": "^1.3.2" } } diff --git a/docs/src/about/coc.md b/docs/src/about/coc.md deleted file mode 100644 index 4ad26fd9..00000000 --- a/docs/src/about/coc.md +++ /dev/null @@ -1,128 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -We as members, contributors, and leaders pledge to make participation in our -community a harassment-free experience for everyone, regardless of age, body -size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socio-economic status, -nationality, personal appearance, race, religion, or sexual identity -and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, -diverse, inclusive, and healthy community. - -## Our Standards - -Examples of behavior that contributes to a positive environment for our -community include: - -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -* Focusing on what is best not just for us as individuals, but for the - overall community - -Examples of unacceptable behavior include: - -* The use of sexualized language or imagery, and sexual attention or - advances of any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email - address, without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Enforcement Responsibilities - -Community leaders are responsible for clarifying and enforcing our standards of -acceptable behavior and will take appropriate and fair corrective action in -response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. - -Community leaders have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, and will communicate reasons for moderation -decisions when appropriate. - -## Scope - -This Code of Conduct applies within all community spaces, and also applies when -an individual is officially representing the community in public spaces. -Examples of representing our community include using an official e-mail address, -posting via an official social media account, or acting as an appointed -representative at an online or offline event. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at -Discord, brenoepic. -All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. - -## Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining -the consequences for any action they deem in violation of this Code of Conduct: - -### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed -unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing -clarity around the nature of the violation and an explanation of why the -behavior was inappropriate. A public apology may be requested. - -### 2. Warning - -**Community Impact**: A violation through a single incident or series -of actions. - -**Consequence**: A warning with consequences for continued behavior. No -interaction with the people involved, including unsolicited interaction with -those enforcing the Code of Conduct, for a specified period of time. This -includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or -permanent ban. - -### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including -sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public -communication with the community for a specified period of time. No public or -private interaction with the people involved, including unsolicited interaction -with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an -individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within -the community. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 2.0, available at -https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. - -Community Impact Guidelines were inspired by [Mozilla's code of conduct -enforcement ladder](https://github.com/mozilla/diversity). - -[homepage]: https://www.contributor-covenant.org - -For answers to common questions about this code of conduct, see the FAQ at -https://www.contributor-covenant.org/faq. Translations are available at -https://www.contributor-covenant.org/translations. diff --git a/docs/src/about/faq.md b/docs/src/about/faq.md deleted file mode 100644 index 8839c1e0..00000000 --- a/docs/src/about/faq.md +++ /dev/null @@ -1,3 +0,0 @@ -# Frequently Asked Questions - -//TODO diff --git a/docs/src/about/releases.md b/docs/src/about/releases.md deleted file mode 100644 index 37bc3dae..00000000 --- a/docs/src/about/releases.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -outline: deep ---- - -# Releases {#releases} - -

-The current latest stable version of AT4J is AT4J-VERSION. -

- - -A full changelog of past releases is available on [GitHub](https://github.com/brenoepics/at4j/releases/). - -## Release Cycle {#release-cycle} - -AT4J does not have a fixed release cycle. - -- Patch releases are released as needed. - -- Minor releases always contain new features, with a typical time frame of 3~6 months in between. Minor releases always go through a beta pre-release phase. - -- Major releases will be announced ahead of time, and will go through an early discussion phase and alpha / beta pre-release phases. - -## Semantic Versioning-Edge Cases {#semantic-versioning-edge-cases} - -AT4J releases follow [Semantic Versioning](https://semver.org/) with a few edge cases. - -## Deprecations {#deprecations} - -We may periodically deprecate features that have new, better replacements in minor releases. Deprecated features will continue to work, and will be removed in the next major release after it entered deprecated status. diff --git a/docs/src/advanced/caching.md b/docs/src/advanced/caching.md new file mode 100644 index 00000000..70aa83e0 --- /dev/null +++ b/docs/src/advanced/caching.md @@ -0,0 +1,4 @@ +# Caching + +> [!WARNING] +> TODO: Add more information about caching in AT4J. diff --git a/docs/src/guide/threading.md b/docs/src/advanced/threading.md similarity index 100% rename from docs/src/guide/threading.md rename to docs/src/advanced/threading.md diff --git a/docs/src/azure-reference/LanguagesTable.vue b/docs/src/azure-reference/LanguagesTable.vue new file mode 100644 index 00000000..0eeeea2d --- /dev/null +++ b/docs/src/azure-reference/LanguagesTable.vue @@ -0,0 +1,58 @@ + + + diff --git a/docs/src/azure-reference/azure_available_languages.json b/docs/src/azure-reference/azure_available_languages.json new file mode 100644 index 00000000..91367a8c --- /dev/null +++ b/docs/src/azure-reference/azure_available_languages.json @@ -0,0 +1,3021 @@ +{ + "translation": { + "af": { + "name": "Afrikaans", + "nativeName": "Afrikaans", + "dir": "ltr" + }, + "am": { + "name": "Amharic", + "nativeName": "አማርኛ", + "dir": "ltr" + }, + "ar": { + "name": "Arabic", + "nativeName": "العربية", + "dir": "rtl" + }, + "as": { + "name": "Assamese", + "nativeName": "অসমীয়া", + "dir": "ltr" + }, + "az": { + "name": "Azerbaijani", + "nativeName": "Azərbaycan", + "dir": "ltr" + }, + "ba": { + "name": "Bashkir", + "nativeName": "Bashkir", + "dir": "ltr" + }, + "bg": { + "name": "Bulgarian", + "nativeName": "Български", + "dir": "ltr" + }, + "bho": { + "name": "Bhojpuri", + "nativeName": "Bhojpuri", + "dir": "ltr" + }, + "bn": { + "name": "Bangla", + "nativeName": "বাংলা", + "dir": "ltr" + }, + "bo": { + "name": "Tibetan", + "nativeName": "བོད་སྐད་", + "dir": "ltr" + }, + "brx": { + "name": "Bodo", + "nativeName": "बड़ो", + "dir": "ltr" + }, + "bs": { + "name": "Bosnian", + "nativeName": "Bosnian", + "dir": "ltr" + }, + "ca": { + "name": "Catalan", + "nativeName": "Català", + "dir": "ltr" + }, + "cs": { + "name": "Czech", + "nativeName": "Čeština", + "dir": "ltr" + }, + "cy": { + "name": "Welsh", + "nativeName": "Cymraeg", + "dir": "ltr" + }, + "da": { + "name": "Danish", + "nativeName": "Dansk", + "dir": "ltr" + }, + "de": { + "name": "German", + "nativeName": "Deutsch", + "dir": "ltr" + }, + "doi": { + "name": "Dogri", + "nativeName": "Dogri", + "dir": "ltr" + }, + "dsb": { + "name": "Lower Sorbian", + "nativeName": "Dolnoserbšćina", + "dir": "ltr" + }, + "dv": { + "name": "Divehi", + "nativeName": "ދިވެހިބަސް", + "dir": "rtl" + }, + "el": { + "name": "Greek", + "nativeName": "Ελληνικά", + "dir": "ltr" + }, + "en": { + "name": "English", + "nativeName": "English", + "dir": "ltr" + }, + "es": { + "name": "Spanish", + "nativeName": "Español", + "dir": "ltr" + }, + "et": { + "name": "Estonian", + "nativeName": "Eesti", + "dir": "ltr" + }, + "eu": { + "name": "Basque", + "nativeName": "Euskara", + "dir": "ltr" + }, + "fa": { + "name": "Persian", + "nativeName": "فارسی", + "dir": "rtl" + }, + "fi": { + "name": "Finnish", + "nativeName": "Suomi", + "dir": "ltr" + }, + "fil": { + "name": "Filipino", + "nativeName": "Filipino", + "dir": "ltr" + }, + "fj": { + "name": "Fijian", + "nativeName": "Na Vosa Vakaviti", + "dir": "ltr" + }, + "fo": { + "name": "Faroese", + "nativeName": "Føroyskt", + "dir": "ltr" + }, + "fr": { + "name": "French", + "nativeName": "Français", + "dir": "ltr" + }, + "fr-CA": { + "name": "French (Canada)", + "nativeName": "Français (Canada)", + "dir": "ltr" + }, + "ga": { + "name": "Irish", + "nativeName": "Gaeilge", + "dir": "ltr" + }, + "gl": { + "name": "Galician", + "nativeName": "Galego", + "dir": "ltr" + }, + "gom": { + "name": "Konkani", + "nativeName": "Konkani", + "dir": "ltr" + }, + "gu": { + "name": "Gujarati", + "nativeName": "ગુજરાતી", + "dir": "ltr" + }, + "ha": { + "name": "Hausa", + "nativeName": "Hausa", + "dir": "ltr" + }, + "he": { + "name": "Hebrew", + "nativeName": "עברית", + "dir": "rtl" + }, + "hi": { + "name": "Hindi", + "nativeName": "हिन्दी", + "dir": "ltr" + }, + "hr": { + "name": "Croatian", + "nativeName": "Hrvatski", + "dir": "ltr" + }, + "hsb": { + "name": "Upper Sorbian", + "nativeName": "Hornjoserbšćina", + "dir": "ltr" + }, + "ht": { + "name": "Haitian Creole", + "nativeName": "Haitian Creole", + "dir": "ltr" + }, + "hu": { + "name": "Hungarian", + "nativeName": "Magyar", + "dir": "ltr" + }, + "hy": { + "name": "Armenian", + "nativeName": "Հայերեն", + "dir": "ltr" + }, + "id": { + "name": "Indonesian", + "nativeName": "Indonesia", + "dir": "ltr" + }, + "ig": { + "name": "Igbo", + "nativeName": "Ásụ̀sụ́ Ìgbò", + "dir": "ltr" + }, + "ikt": { + "name": "Inuinnaqtun", + "nativeName": "Inuinnaqtun", + "dir": "ltr" + }, + "is": { + "name": "Icelandic", + "nativeName": "Íslenska", + "dir": "ltr" + }, + "it": { + "name": "Italian", + "nativeName": "Italiano", + "dir": "ltr" + }, + "iu": { + "name": "Inuktitut", + "nativeName": "ᐃᓄᒃᑎᑐᑦ", + "dir": "ltr" + }, + "iu-Latn": { + "name": "Inuktitut (Latin)", + "nativeName": "Inuktitut (Latin)", + "dir": "ltr" + }, + "ja": { + "name": "Japanese", + "nativeName": "日本語", + "dir": "ltr" + }, + "ka": { + "name": "Georgian", + "nativeName": "ქართული", + "dir": "ltr" + }, + "kk": { + "name": "Kazakh", + "nativeName": "Қазақ Тілі", + "dir": "ltr" + }, + "km": { + "name": "Khmer", + "nativeName": "ខ្មែរ", + "dir": "ltr" + }, + "kmr": { + "name": "Kurdish (Northern)", + "nativeName": "Kurdî (Bakur)", + "dir": "ltr" + }, + "kn": { + "name": "Kannada", + "nativeName": "ಕನ್ನಡ", + "dir": "ltr" + }, + "ko": { + "name": "Korean", + "nativeName": "한국어", + "dir": "ltr" + }, + "ks": { + "name": "Kashmiri", + "nativeName": "کٲشُر", + "dir": "rtl" + }, + "ku": { + "name": "Kurdish (Central)", + "nativeName": "Kurdî (Navîn)", + "dir": "rtl" + }, + "ky": { + "name": "Kyrgyz", + "nativeName": "Кыргызча", + "dir": "ltr" + }, + "ln": { + "name": "Lingala", + "nativeName": "Lingála", + "dir": "ltr" + }, + "lo": { + "name": "Lao", + "nativeName": "ລາວ", + "dir": "ltr" + }, + "lt": { + "name": "Lithuanian", + "nativeName": "Lietuvių", + "dir": "ltr" + }, + "lug": { + "name": "Ganda", + "nativeName": "Ganda", + "dir": "ltr" + }, + "lv": { + "name": "Latvian", + "nativeName": "Latviešu", + "dir": "ltr" + }, + "lzh": { + "name": "Chinese (Literary)", + "nativeName": "中文 (文言文)", + "dir": "ltr" + }, + "mai": { + "name": "Maithili", + "nativeName": "Maithili", + "dir": "ltr" + }, + "mg": { + "name": "Malagasy", + "nativeName": "Malagasy", + "dir": "ltr" + }, + "mi": { + "name": "Māori", + "nativeName": "Te Reo Māori", + "dir": "ltr" + }, + "mk": { + "name": "Macedonian", + "nativeName": "Македонски", + "dir": "ltr" + }, + "ml": { + "name": "Malayalam", + "nativeName": "മലയാളം", + "dir": "ltr" + }, + "mn-Cyrl": { + "name": "Mongolian (Cyrillic)", + "nativeName": "Mongolian (Cyrillic)", + "dir": "ltr" + }, + "mn-Mong": { + "name": "Mongolian (Traditional)", + "nativeName": "ᠮᠣᠩᠭᠣᠯ ᠬᠡᠯᠡ", + "dir": "ltr" + }, + "mr": { + "name": "Marathi", + "nativeName": "मराठी", + "dir": "ltr" + }, + "ms": { + "name": "Malay", + "nativeName": "Melayu", + "dir": "ltr" + }, + "mt": { + "name": "Maltese", + "nativeName": "Malti", + "dir": "ltr" + }, + "mww": { + "name": "Hmong Daw", + "nativeName": "Hmong Daw", + "dir": "ltr" + }, + "my": { + "name": "Myanmar (Burmese)", + "nativeName": "မြန်မာ", + "dir": "ltr" + }, + "nb": { + "name": "Norwegian", + "nativeName": "Norsk Bokmål", + "dir": "ltr" + }, + "ne": { + "name": "Nepali", + "nativeName": "नेपाली", + "dir": "ltr" + }, + "nl": { + "name": "Dutch", + "nativeName": "Nederlands", + "dir": "ltr" + }, + "nso": { + "name": "Sesotho sa Leboa", + "nativeName": "Sesotho sa Leboa", + "dir": "ltr" + }, + "nya": { + "name": "Nyanja", + "nativeName": "Nyanja", + "dir": "ltr" + }, + "or": { + "name": "Odia", + "nativeName": "ଓଡ଼ିଆ", + "dir": "ltr" + }, + "otq": { + "name": "Querétaro Otomi", + "nativeName": "Hñähñu", + "dir": "ltr" + }, + "pa": { + "name": "Punjabi", + "nativeName": "ਪੰਜਾਬੀ", + "dir": "ltr" + }, + "pl": { + "name": "Polish", + "nativeName": "Polski", + "dir": "ltr" + }, + "prs": { + "name": "Dari", + "nativeName": "دری", + "dir": "rtl" + }, + "ps": { + "name": "Pashto", + "nativeName": "پښتو", + "dir": "rtl" + }, + "pt": { + "name": "Portuguese (Brazil)", + "nativeName": "Português (Brasil)", + "dir": "ltr" + }, + "pt-PT": { + "name": "Portuguese (Portugal)", + "nativeName": "Português (Portugal)", + "dir": "ltr" + }, + "ro": { + "name": "Romanian", + "nativeName": "Română", + "dir": "ltr" + }, + "ru": { + "name": "Russian", + "nativeName": "Русский", + "dir": "ltr" + }, + "run": { + "name": "Rundi", + "nativeName": "Rundi", + "dir": "ltr" + }, + "rw": { + "name": "Kinyarwanda", + "nativeName": "Kinyarwanda", + "dir": "ltr" + }, + "sd": { + "name": "Sindhi", + "nativeName": "سنڌي", + "dir": "rtl" + }, + "si": { + "name": "Sinhala", + "nativeName": "සිංහල", + "dir": "ltr" + }, + "sk": { + "name": "Slovak", + "nativeName": "Slovenčina", + "dir": "ltr" + }, + "sl": { + "name": "Slovenian", + "nativeName": "Slovenščina", + "dir": "ltr" + }, + "sm": { + "name": "Samoan", + "nativeName": "Gagana Sāmoa", + "dir": "ltr" + }, + "sn": { + "name": "Shona", + "nativeName": "chiShona", + "dir": "ltr" + }, + "so": { + "name": "Somali", + "nativeName": "Soomaali", + "dir": "ltr" + }, + "sq": { + "name": "Albanian", + "nativeName": "Shqip", + "dir": "ltr" + }, + "sr-Cyrl": { + "name": "Serbian (Cyrillic)", + "nativeName": "Српски (ћирилица)", + "dir": "ltr" + }, + "sr-Latn": { + "name": "Serbian (Latin)", + "nativeName": "Srpski (latinica)", + "dir": "ltr" + }, + "st": { + "name": "Sesotho", + "nativeName": "Sesotho", + "dir": "ltr" + }, + "sv": { + "name": "Swedish", + "nativeName": "Svenska", + "dir": "ltr" + }, + "sw": { + "name": "Swahili", + "nativeName": "Kiswahili", + "dir": "ltr" + }, + "ta": { + "name": "Tamil", + "nativeName": "தமிழ்", + "dir": "ltr" + }, + "te": { + "name": "Telugu", + "nativeName": "తెలుగు", + "dir": "ltr" + }, + "th": { + "name": "Thai", + "nativeName": "ไทย", + "dir": "ltr" + }, + "ti": { + "name": "Tigrinya", + "nativeName": "ትግር", + "dir": "ltr" + }, + "tk": { + "name": "Turkmen", + "nativeName": "Türkmen Dili", + "dir": "ltr" + }, + "tlh-Latn": { + "name": "Klingon (Latin)", + "nativeName": "Klingon (Latin)", + "dir": "ltr" + }, + "tlh-Piqd": { + "name": "Klingon (pIqaD)", + "nativeName": "Klingon (pIqaD)", + "dir": "ltr" + }, + "tn": { + "name": "Setswana", + "nativeName": "Setswana", + "dir": "ltr" + }, + "to": { + "name": "Tongan", + "nativeName": "Lea Fakatonga", + "dir": "ltr" + }, + "tr": { + "name": "Turkish", + "nativeName": "Türkçe", + "dir": "ltr" + }, + "tt": { + "name": "Tatar", + "nativeName": "Татар", + "dir": "ltr" + }, + "ty": { + "name": "Tahitian", + "nativeName": "Reo Tahiti", + "dir": "ltr" + }, + "ug": { + "name": "Uyghur", + "nativeName": "ئۇيغۇرچە", + "dir": "rtl" + }, + "uk": { + "name": "Ukrainian", + "nativeName": "Українська", + "dir": "ltr" + }, + "ur": { + "name": "Urdu", + "nativeName": "اردو", + "dir": "rtl" + }, + "uz": { + "name": "Uzbek (Latin)", + "nativeName": "Uzbek (Latin)", + "dir": "ltr" + }, + "vi": { + "name": "Vietnamese", + "nativeName": "Tiếng Việt", + "dir": "ltr" + }, + "xh": { + "name": "Xhosa", + "nativeName": "isiXhosa", + "dir": "ltr" + }, + "yo": { + "name": "Yoruba", + "nativeName": "Èdè Yorùbá", + "dir": "ltr" + }, + "yua": { + "name": "Yucatec Maya", + "nativeName": "Yucatec Maya", + "dir": "ltr" + }, + "yue": { + "name": "Cantonese (Traditional)", + "nativeName": "粵語 (繁體)", + "dir": "ltr" + }, + "zh-Hans": { + "name": "Chinese Simplified", + "nativeName": "中文 (简体)", + "dir": "ltr" + }, + "zh-Hant": { + "name": "Chinese Traditional", + "nativeName": "繁體中文 (繁體)", + "dir": "ltr" + }, + "zu": { + "name": "Zulu", + "nativeName": "Isi-Zulu", + "dir": "ltr" + } + }, + "transliteration": { + "ar": { + "name": "Arabic", + "nativeName": "العربية", + "scripts": [ + { + "code": "Arab", + "name": "Arabic", + "nativeName": "العربية", + "dir": "rtl", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "اللاتينية", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "اللاتينية", + "dir": "ltr", + "toScripts": [ + { + "code": "Arab", + "name": "Arabic", + "nativeName": "العربية", + "dir": "rtl" + } + ] + } + ] + }, + "as": { + "name": "Assamese", + "nativeName": "অসমীয়া", + "scripts": [ + { + "code": "Beng", + "name": "Bengali", + "nativeName": "বাংলা", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "লেটিন", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "লেটিন", + "dir": "ltr", + "toScripts": [ + { + "code": "Beng", + "name": "Bangla", + "nativeName": "বাংলা", + "dir": "ltr" + } + ] + } + ] + }, + "be": { + "name": "Belarusian", + "nativeName": "беларуская", + "scripts": [ + { + "code": "Cyrl", + "name": "Cyrillic", + "nativeName": "Кірыліца", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "Лацініца", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "Лацініца", + "dir": "ltr", + "toScripts": [ + { + "code": "Cyrl", + "name": "Cyrillic", + "nativeName": "Кірыліца", + "dir": "ltr" + } + ] + } + ] + }, + "bg": { + "name": "Bulgarian", + "nativeName": "Български", + "scripts": [ + { + "code": "Cyrl", + "name": "Cyrillic", + "nativeName": "кирилица", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "латиница", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "латиница", + "dir": "ltr", + "toScripts": [ + { + "code": "Cyrl", + "name": "Cyrillic", + "nativeName": "кирилица", + "dir": "ltr" + } + ] + } + ] + }, + "bn": { + "name": "Bangla", + "nativeName": "বাংলা", + "scripts": [ + { + "code": "Beng", + "name": "Bengali", + "nativeName": "বাংলা", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "ল্যাটিন", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "ল্যাটিন", + "dir": "ltr", + "toScripts": [ + { + "code": "Beng", + "name": "Bangla", + "nativeName": "বাংলা", + "dir": "ltr" + } + ] + } + ] + }, + "brx": { + "name": "Bodo", + "nativeName": "बड़ो", + "scripts": [ + { + "code": "Deva", + "name": "Devanagari", + "nativeName": "Devanagari", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "Latin", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "Latin", + "dir": "ltr", + "toScripts": [ + { + "code": "Deva", + "name": "Devanagari", + "nativeName": "Devanagari", + "dir": "ltr" + } + ] + } + ] + }, + "el": { + "name": "Greek", + "nativeName": "Ελληνικά", + "scripts": [ + { + "code": "Grek", + "name": "Greek", + "nativeName": "ελληνικό", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "λατινικό", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "λατινικό", + "dir": "ltr", + "toScripts": [ + { + "code": "Grek", + "name": "Greek", + "nativeName": "ελληνικό", + "dir": "ltr" + } + ] + } + ] + }, + "fa": { + "name": "Persian", + "nativeName": "فارسی", + "scripts": [ + { + "code": "Arab", + "name": "Arabic", + "nativeName": "عربی", + "dir": "rtl", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "لاتین", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "لاتین", + "dir": "ltr", + "toScripts": [ + { + "code": "Arab", + "name": "Arabic", + "nativeName": "عربی", + "dir": "rtl" + } + ] + } + ] + }, + "gom": { + "name": "Konkani", + "nativeName": "Konkani", + "scripts": [ + { + "code": "Deva", + "name": "Devanagari", + "nativeName": "Devanagari", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "Latin", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "Latin", + "dir": "ltr", + "toScripts": [ + { + "code": "Deva", + "name": "Devanagari", + "nativeName": "Devanagari", + "dir": "ltr" + } + ] + } + ] + }, + "gu": { + "name": "Gujarati", + "nativeName": "ગુજરાતી", + "scripts": [ + { + "code": "Gujr", + "name": "Gujarati", + "nativeName": "ગુજરાતી", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "લેટિન", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "લેટિન", + "dir": "ltr", + "toScripts": [ + { + "code": "Gujr", + "name": "Gujarati", + "nativeName": "ગુજરાતી", + "dir": "ltr" + } + ] + } + ] + }, + "he": { + "name": "Hebrew", + "nativeName": "עברית", + "scripts": [ + { + "code": "Hebr", + "name": "Hebrew", + "nativeName": "עברי", + "dir": "rtl", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "לטיני", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "לטיני", + "dir": "ltr", + "toScripts": [ + { + "code": "Hebr", + "name": "Hebrew", + "nativeName": "עברי", + "dir": "rtl" + } + ] + } + ] + }, + "hi": { + "name": "Hindi", + "nativeName": "हिन्दी", + "scripts": [ + { + "code": "Deva", + "name": "Devanagari", + "nativeName": "देवनागरी", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "लैटिन", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "लैटिन", + "dir": "ltr", + "toScripts": [ + { + "code": "Deva", + "name": "Devanagari", + "nativeName": "देवनागरी", + "dir": "ltr" + } + ] + } + ] + }, + "ja": { + "name": "Japanese", + "nativeName": "日本語", + "scripts": [ + { + "code": "Jpan", + "name": "Japanese", + "nativeName": "日本語の文字", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "ラテン文字", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "ラテン文字", + "dir": "ltr", + "toScripts": [ + { + "code": "Jpan", + "name": "Japanese", + "nativeName": "日本語の文字", + "dir": "ltr" + } + ] + } + ] + }, + "kk": { + "name": "Kazakh", + "nativeName": "Қазақ Тілі", + "scripts": [ + { + "code": "Cyrl", + "name": "Cyrillic", + "nativeName": "кирилл жазуы", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "латын жазуы", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "латын жазуы", + "dir": "ltr", + "toScripts": [ + { + "code": "Cyrl", + "name": "Cyrillic", + "nativeName": "кирилл жазуы", + "dir": "ltr" + } + ] + } + ] + }, + "kn": { + "name": "Kannada", + "nativeName": "ಕನ್ನಡ", + "scripts": [ + { + "code": "Knda", + "name": "Kannada", + "nativeName": "ಕನ್ನಡ", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "ಲ್ಯಾಟಿನ್", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "ಲ್ಯಾಟಿನ್", + "dir": "ltr", + "toScripts": [ + { + "code": "Knda", + "name": "Kannada", + "nativeName": "ಕನ್ನಡ", + "dir": "ltr" + } + ] + } + ] + }, + "ko": { + "name": "Korean", + "nativeName": "한국어", + "scripts": [ + { + "code": "Kore", + "name": "Korean", + "nativeName": "한국 문자", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "로마자", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "로마자", + "dir": "ltr", + "toScripts": [ + { + "code": "Kore", + "name": "Korean", + "nativeName": "한국 문자", + "dir": "ltr" + } + ] + } + ] + }, + "ks": { + "name": "Kashmiri", + "nativeName": "کٲشُر", + "scripts": [ + { + "code": "Arab", + "name": "Arabic", + "nativeName": "Arabic", + "dir": "rtl", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "Latin", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "Latin", + "dir": "ltr", + "toScripts": [ + { + "code": "Arab", + "name": "Arabic", + "nativeName": "Arabic", + "dir": "rtl" + } + ] + } + ] + }, + "ky": { + "name": "Kyrgyz", + "nativeName": "Кыргызча", + "scripts": [ + { + "code": "Cyrl", + "name": "Cyrillic", + "nativeName": "кирилл", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "латын", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "латын", + "dir": "ltr", + "toScripts": [ + { + "code": "Cyrl", + "name": "Cyrillic", + "nativeName": "кирилл", + "dir": "ltr" + } + ] + } + ] + }, + "mai": { + "name": "Maithili", + "nativeName": "Maithili", + "scripts": [ + { + "code": "Deva", + "name": "Devanagari", + "nativeName": "Devanagari", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "Latin", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "Latin", + "dir": "ltr", + "toScripts": [ + { + "code": "Deva", + "name": "Devanagari", + "nativeName": "Devanagari", + "dir": "ltr" + } + ] + } + ] + }, + "mk": { + "name": "Macedonian", + "nativeName": "Македонски", + "scripts": [ + { + "code": "Cyrl", + "name": "Cyrillic", + "nativeName": "кирилско писмо", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "латинично писмо", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "латинично писмо", + "dir": "ltr", + "toScripts": [ + { + "code": "Cyrl", + "name": "Cyrillic", + "nativeName": "кирилско писмо", + "dir": "ltr" + } + ] + } + ] + }, + "ml": { + "name": "Malayalam", + "nativeName": "മലയാളം", + "scripts": [ + { + "code": "Mlym", + "name": "Malayalam", + "nativeName": "മലയാളം", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "ലാറ്റിൻ", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "ലാറ്റിൻ", + "dir": "ltr", + "toScripts": [ + { + "code": "Mlym", + "name": "Malayalam", + "nativeName": "മലയാളം", + "dir": "ltr" + } + ] + } + ] + }, + "mn-Cyrl": { + "name": "Mongolian (Cyrillic)", + "nativeName": "Mongolian (Cyrillic)", + "scripts": [ + { + "code": "Cyrl", + "name": "Cyrillic", + "nativeName": "кирилл", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "латин", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "латин", + "dir": "ltr", + "toScripts": [ + { + "code": "Cyrl", + "name": "Cyrillic", + "nativeName": "кирилл", + "dir": "ltr" + } + ] + } + ] + }, + "mni": { + "name": "Manipuri", + "nativeName": "মৈতৈলোন্", + "scripts": [ + { + "code": "Beng", + "name": "Bengali", + "nativeName": "Bengali", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "Latin", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "Latin", + "dir": "ltr", + "toScripts": [ + { + "code": "Beng", + "name": "Bangla", + "nativeName": "Bengali", + "dir": "ltr" + } + ] + } + ] + }, + "mr": { + "name": "Marathi", + "nativeName": "मराठी", + "scripts": [ + { + "code": "Deva", + "name": "Devanagari", + "nativeName": "देवनागरी", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "लॅटिन", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "लॅटिन", + "dir": "ltr", + "toScripts": [ + { + "code": "Deva", + "name": "Devanagari", + "nativeName": "देवनागरी", + "dir": "ltr" + } + ] + } + ] + }, + "ne": { + "name": "Nepali", + "nativeName": "नेपाली", + "scripts": [ + { + "code": "Deva", + "name": "Devanagari", + "nativeName": "देवानागरी", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "ल्याटिन", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "ल्याटिन", + "dir": "ltr", + "toScripts": [ + { + "code": "Deva", + "name": "Devanagari", + "nativeName": "देवानागरी", + "dir": "ltr" + } + ] + } + ] + }, + "or": { + "name": "Odia", + "nativeName": "ଓଡ଼ିଆ", + "scripts": [ + { + "code": "Orya", + "name": "Odia", + "nativeName": "ଓଡ଼ିଆ", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "ଲାଟିନ୍", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "ଲାଟିନ୍", + "dir": "ltr", + "toScripts": [ + { + "code": "Orya", + "name": "Odia", + "nativeName": "ଓଡ଼ିଆ", + "dir": "ltr" + } + ] + } + ] + }, + "pa": { + "name": "Punjabi", + "nativeName": "ਪੰਜਾਬੀ", + "scripts": [ + { + "code": "Guru", + "name": "Gurmukhi", + "nativeName": "ਗੁਰਮੁਖੀ", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "ਲਾਤੀਨੀ", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "ਲਾਤੀਨੀ", + "dir": "ltr", + "toScripts": [ + { + "code": "Guru", + "name": "Gurmukhi", + "nativeName": "ਗੁਰਮੁਖੀ", + "dir": "ltr" + } + ] + } + ] + }, + "ru": { + "name": "Russian", + "nativeName": "Русский", + "scripts": [ + { + "code": "Cyrl", + "name": "Cyrillic", + "nativeName": "кириллица", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "латиница", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "латиница", + "dir": "ltr", + "toScripts": [ + { + "code": "Cyrl", + "name": "Cyrillic", + "nativeName": "кириллица", + "dir": "ltr" + } + ] + } + ] + }, + "sa": { + "name": "Sanskrit", + "nativeName": "संस्कृत", + "scripts": [ + { + "code": "Deva", + "name": "Devanagari", + "nativeName": "Devanagari", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "Latin", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "Latin", + "dir": "ltr", + "toScripts": [ + { + "code": "Deva", + "name": "Devanagari", + "nativeName": "Devanagari", + "dir": "ltr" + } + ] + } + ] + }, + "sd": { + "name": "Sindhi", + "nativeName": "سنڌي", + "scripts": [ + { + "code": "Arab", + "name": "Arabic", + "nativeName": "عربي", + "dir": "rtl", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "لاطيني", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "لاطيني", + "dir": "ltr", + "toScripts": [ + { + "code": "Arab", + "name": "Arabic", + "nativeName": "عربي", + "dir": "rtl" + } + ] + } + ] + }, + "si": { + "name": "Sinhala", + "nativeName": "සිංහල", + "scripts": [ + { + "code": "Sinh", + "name": "Sinhala", + "nativeName": "සිංහල", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "ලතින්", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "ලතින්", + "dir": "ltr", + "toScripts": [ + { + "code": "Sinh", + "name": "Sinhala", + "nativeName": "සිංහල", + "dir": "ltr" + } + ] + } + ] + }, + "sr-Cyrl": { + "name": "Serbian (Cyrillic)", + "nativeName": "Српски (ћирилица)", + "scripts": [ + { + "code": "Cyrl", + "name": "Cyrillic", + "nativeName": "ћирилица", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "latinica", + "dir": "ltr" + } + ] + } + ] + }, + "sr-Latn": { + "name": "Serbian (Latin)", + "nativeName": "Srpski (latinica)", + "scripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "latinica", + "dir": "ltr", + "toScripts": [ + { + "code": "Cyrl", + "name": "Cyrillic", + "nativeName": "ćirilica", + "dir": "ltr" + } + ] + } + ] + }, + "ta": { + "name": "Tamil", + "nativeName": "தமிழ்", + "scripts": [ + { + "code": "Taml", + "name": "Tamil", + "nativeName": "தமிழ்", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "லத்தின்", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "லத்தின்", + "dir": "ltr", + "toScripts": [ + { + "code": "Taml", + "name": "Tamil", + "nativeName": "தமிழ்", + "dir": "ltr" + } + ] + } + ] + }, + "te": { + "name": "Telugu", + "nativeName": "తెలుగు", + "scripts": [ + { + "code": "Telu", + "name": "Telugu", + "nativeName": "తెలుగు", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "లాటిన్", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "లాటిన్", + "dir": "ltr", + "toScripts": [ + { + "code": "Telu", + "name": "Telugu", + "nativeName": "తెలుగు", + "dir": "ltr" + } + ] + } + ] + }, + "tg": { + "name": "Tajik", + "nativeName": "Tajik (Cyrillic)", + "scripts": [ + { + "code": "Cyrl", + "name": "Cyrillic", + "nativeName": "Кириллӣ", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "Лотинӣ", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "Лотинӣ", + "dir": "ltr", + "toScripts": [ + { + "code": "Cyrl", + "name": "Cyrillic", + "nativeName": "Кириллӣ", + "dir": "ltr" + } + ] + } + ] + }, + "th": { + "name": "Thai", + "nativeName": "ไทย", + "scripts": [ + { + "code": "Thai", + "name": "Thai", + "nativeName": "ไทย", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "ละติน", + "dir": "ltr" + } + ] + } + ] + }, + "tt": { + "name": "Tatar", + "nativeName": "Татар", + "scripts": [ + { + "code": "Cyrl", + "name": "Cyrillic", + "nativeName": "кирилл", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "латин", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "латин", + "dir": "ltr", + "toScripts": [ + { + "code": "Cyrl", + "name": "Cyrillic", + "nativeName": "кирилл", + "dir": "ltr" + } + ] + } + ] + }, + "uk": { + "name": "Ukrainian", + "nativeName": "Українська", + "scripts": [ + { + "code": "Cyrl", + "name": "Cyrillic", + "nativeName": "кирилиця", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "латиниця", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "латиниця", + "dir": "ltr", + "toScripts": [ + { + "code": "Cyrl", + "name": "Cyrillic", + "nativeName": "кирилиця", + "dir": "ltr" + } + ] + } + ] + }, + "ur": { + "name": "Urdu", + "nativeName": "اردو", + "scripts": [ + { + "code": "Arab", + "name": "Arabic", + "nativeName": "عربی", + "dir": "rtl", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "لاطینی", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "لاطینی", + "dir": "ltr", + "toScripts": [ + { + "code": "Arab", + "name": "Arabic", + "nativeName": "عربی", + "dir": "rtl" + } + ] + } + ] + }, + "zh-Hans": { + "name": "Chinese Simplified", + "nativeName": "中文 (简体)", + "scripts": [ + { + "code": "Hans", + "name": "Simplified", + "nativeName": "简体汉语", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "拉丁语", + "dir": "ltr" + }, + { + "code": "Hant", + "name": "Hat", + "nativeName": "传统", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "拉丁语", + "dir": "ltr", + "toScripts": [ + { + "code": "Hans", + "name": "Han", + "nativeName": "简体汉语", + "dir": "ltr" + }, + { + "code": "Hant", + "name": "Hat", + "nativeName": "传统", + "dir": "ltr" + } + ] + } + ] + }, + "zh-Hant": { + "name": "Chinese Traditional", + "nativeName": "繁體中文 (繁體)", + "scripts": [ + { + "code": "Hant", + "name": "Traditional", + "nativeName": "傳統", + "dir": "ltr", + "toScripts": [ + { + "code": "Latn", + "name": "Latin", + "nativeName": "拉丁语", + "dir": "ltr" + }, + { + "code": "Hans", + "name": "Han", + "nativeName": "简体汉语", + "dir": "ltr" + } + ] + }, + { + "code": "Latn", + "name": "Latin", + "nativeName": "拉丁文", + "dir": "ltr", + "toScripts": [ + { + "code": "Hans", + "name": "Han", + "nativeName": "简体汉语", + "dir": "ltr" + }, + { + "code": "Hant", + "name": "Hat", + "nativeName": "传统", + "dir": "ltr" + } + ] + } + ] + } + }, + "dictionary": { + "af": { + "name": "Afrikaans", + "nativeName": "Afrikaans", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "ar": { + "name": "Arabic", + "nativeName": "العربية", + "dir": "rtl", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "bg": { + "name": "Bulgarian", + "nativeName": "Български", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "bn": { + "name": "Bangla", + "nativeName": "বাংলা", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "bs": { + "name": "Bosnian", + "nativeName": "Bosnian", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "ca": { + "name": "Catalan", + "nativeName": "Català", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "cs": { + "name": "Czech", + "nativeName": "Čeština", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "cy": { + "name": "Welsh", + "nativeName": "Cymraeg", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "da": { + "name": "Danish", + "nativeName": "Dansk", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "de": { + "name": "German", + "nativeName": "Deutsch", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "el": { + "name": "Greek", + "nativeName": "Ελληνικά", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "en": { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "translations": [ + { + "name": "Afrikaans", + "nativeName": "Afrikaans", + "dir": "ltr", + "code": "af" + }, + { + "name": "Arabic", + "nativeName": "العربية", + "dir": "rtl", + "code": "ar" + }, + { + "name": "Bulgarian", + "nativeName": "Български", + "dir": "ltr", + "code": "bg" + }, + { + "name": "Bangla", + "nativeName": "বাংলা", + "dir": "ltr", + "code": "bn" + }, + { + "name": "Bosnian", + "nativeName": "Bosnian", + "dir": "ltr", + "code": "bs" + }, + { + "name": "Catalan", + "nativeName": "Català", + "dir": "ltr", + "code": "ca" + }, + { + "name": "Chinese Simplified", + "nativeName": "中文 (简体)", + "dir": "ltr", + "code": "zh-Hans" + }, + { + "name": "Czech", + "nativeName": "Čeština", + "dir": "ltr", + "code": "cs" + }, + { + "name": "Welsh", + "nativeName": "Cymraeg", + "dir": "ltr", + "code": "cy" + }, + { + "name": "Danish", + "nativeName": "Dansk", + "dir": "ltr", + "code": "da" + }, + { + "name": "German", + "nativeName": "Deutsch", + "dir": "ltr", + "code": "de" + }, + { + "name": "Greek", + "nativeName": "Ελληνικά", + "dir": "ltr", + "code": "el" + }, + { + "name": "Spanish", + "nativeName": "Español", + "dir": "ltr", + "code": "es" + }, + { + "name": "Estonian", + "nativeName": "Eesti", + "dir": "ltr", + "code": "et" + }, + { + "name": "Persian", + "nativeName": "فارسی", + "dir": "rtl", + "code": "fa" + }, + { + "name": "Finnish", + "nativeName": "Suomi", + "dir": "ltr", + "code": "fi" + }, + { + "name": "French", + "nativeName": "Français", + "dir": "ltr", + "code": "fr" + }, + { + "name": "Hebrew", + "nativeName": "עברית", + "dir": "rtl", + "code": "he" + }, + { + "name": "Hindi", + "nativeName": "हिन्दी", + "dir": "ltr", + "code": "hi" + }, + { + "name": "Croatian", + "nativeName": "Hrvatski", + "dir": "ltr", + "code": "hr" + }, + { + "name": "Hungarian", + "nativeName": "Magyar", + "dir": "ltr", + "code": "hu" + }, + { + "name": "Indonesian", + "nativeName": "Indonesia", + "dir": "ltr", + "code": "id" + }, + { + "name": "Icelandic", + "nativeName": "Íslenska", + "dir": "ltr", + "code": "is" + }, + { + "name": "Italian", + "nativeName": "Italiano", + "dir": "ltr", + "code": "it" + }, + { + "name": "Japanese", + "nativeName": "日本語", + "dir": "ltr", + "code": "ja" + }, + { + "name": "Korean", + "nativeName": "한국어", + "dir": "ltr", + "code": "ko" + }, + { + "name": "Lithuanian", + "nativeName": "Lietuvių", + "dir": "ltr", + "code": "lt" + }, + { + "name": "Latvian", + "nativeName": "Latviešu", + "dir": "ltr", + "code": "lv" + }, + { + "name": "Maltese", + "nativeName": "Malti", + "dir": "ltr", + "code": "mt" + }, + { + "name": "Malay", + "nativeName": "Melayu", + "dir": "ltr", + "code": "ms" + }, + { + "name": "Hmong Daw", + "nativeName": "Hmong Daw", + "dir": "ltr", + "code": "mww" + }, + { + "name": "Dutch", + "nativeName": "Nederlands", + "dir": "ltr", + "code": "nl" + }, + { + "name": "Norwegian", + "nativeName": "Norsk Bokmål", + "dir": "ltr", + "code": "nb" + }, + { + "name": "Polish", + "nativeName": "Polski", + "dir": "ltr", + "code": "pl" + }, + { + "name": "Portuguese (Brazil)", + "nativeName": "Português (Brasil)", + "dir": "ltr", + "code": "pt" + }, + { + "name": "Romanian", + "nativeName": "Română", + "dir": "ltr", + "code": "ro" + }, + { + "name": "Russian", + "nativeName": "Русский", + "dir": "ltr", + "code": "ru" + }, + { + "name": "Slovak", + "nativeName": "Slovenčina", + "dir": "ltr", + "code": "sk" + }, + { + "name": "Slovenian", + "nativeName": "Slovenščina", + "dir": "ltr", + "code": "sl" + }, + { + "name": "Serbian (Latin)", + "nativeName": "Srpski (latinica)", + "dir": "ltr", + "code": "sr-Latn" + }, + { + "name": "Swedish", + "nativeName": "Svenska", + "dir": "ltr", + "code": "sv" + }, + { + "name": "Swahili", + "nativeName": "Kiswahili", + "dir": "ltr", + "code": "sw" + }, + { + "name": "Tamil", + "nativeName": "தமிழ்", + "dir": "ltr", + "code": "ta" + }, + { + "name": "Thai", + "nativeName": "ไทย", + "dir": "ltr", + "code": "th" + }, + { + "name": "Klingon (Latin)", + "nativeName": "Klingon (Latin)", + "dir": "ltr", + "code": "tlh-Latn" + }, + { + "name": "Turkish", + "nativeName": "Türkçe", + "dir": "ltr", + "code": "tr" + }, + { + "name": "Ukrainian", + "nativeName": "Українська", + "dir": "ltr", + "code": "uk" + }, + { + "name": "Urdu", + "nativeName": "اردو", + "dir": "rtl", + "code": "ur" + }, + { + "name": "Vietnamese", + "nativeName": "Tiếng Việt", + "dir": "ltr", + "code": "vi" + } + ] + }, + "es": { + "name": "Spanish", + "nativeName": "Español", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "et": { + "name": "Estonian", + "nativeName": "Eesti", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "fa": { + "name": "Persian", + "nativeName": "فارسی", + "dir": "rtl", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "fi": { + "name": "Finnish", + "nativeName": "Suomi", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "fr": { + "name": "French", + "nativeName": "Français", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "he": { + "name": "Hebrew", + "nativeName": "עברית", + "dir": "rtl", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "hi": { + "name": "Hindi", + "nativeName": "हिन्दी", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "hr": { + "name": "Croatian", + "nativeName": "Hrvatski", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "hu": { + "name": "Hungarian", + "nativeName": "Magyar", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "id": { + "name": "Indonesian", + "nativeName": "Indonesia", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "is": { + "name": "Icelandic", + "nativeName": "Íslenska", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "it": { + "name": "Italian", + "nativeName": "Italiano", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "ja": { + "name": "Japanese", + "nativeName": "日本語", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "ko": { + "name": "Korean", + "nativeName": "한국어", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "lt": { + "name": "Lithuanian", + "nativeName": "Lietuvių", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "lv": { + "name": "Latvian", + "nativeName": "Latviešu", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "ms": { + "name": "Malay", + "nativeName": "Melayu", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "mt": { + "name": "Maltese", + "nativeName": "Malti", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "mww": { + "name": "Hmong Daw", + "nativeName": "Hmong Daw", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "nb": { + "name": "Norwegian", + "nativeName": "Norsk Bokmål", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "nl": { + "name": "Dutch", + "nativeName": "Nederlands", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "pl": { + "name": "Polish", + "nativeName": "Polski", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "pt": { + "name": "Portuguese (Brazil)", + "nativeName": "Português (Brasil)", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "ro": { + "name": "Romanian", + "nativeName": "Română", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "ru": { + "name": "Russian", + "nativeName": "Русский", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "sk": { + "name": "Slovak", + "nativeName": "Slovenčina", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "sl": { + "name": "Slovenian", + "nativeName": "Slovenščina", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "sr-Latn": { + "name": "Serbian (Latin)", + "nativeName": "Srpski (latinica)", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "sv": { + "name": "Swedish", + "nativeName": "Svenska", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "sw": { + "name": "Swahili", + "nativeName": "Kiswahili", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "ta": { + "name": "Tamil", + "nativeName": "தமிழ்", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "th": { + "name": "Thai", + "nativeName": "ไทย", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "tlh-Latn": { + "name": "Klingon (Latin)", + "nativeName": "Klingon (Latin)", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "tr": { + "name": "Turkish", + "nativeName": "Türkçe", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "uk": { + "name": "Ukrainian", + "nativeName": "Українська", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "ur": { + "name": "Urdu", + "nativeName": "اردو", + "dir": "rtl", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "vi": { + "name": "Vietnamese", + "nativeName": "Tiếng Việt", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + }, + "zh-Hans": { + "name": "Chinese Simplified", + "nativeName": "中文 (简体)", + "dir": "ltr", + "translations": [ + { + "name": "English", + "nativeName": "English", + "dir": "ltr", + "code": "en" + } + ] + } + } +} diff --git a/docs/src/azure_datacenter_list.json b/docs/src/azure-reference/azure_datacenter_list.json similarity index 100% rename from docs/src/azure_datacenter_list.json rename to docs/src/azure-reference/azure_datacenter_list.json diff --git a/docs/src/azure-reference/datacenter-list.md b/docs/src/azure-reference/datacenter-list.md new file mode 100644 index 00000000..734a6597 --- /dev/null +++ b/docs/src/azure-reference/datacenter-list.md @@ -0,0 +1,8 @@ +# Datacenter List + +This page contains a list of Azure datacenters and their locations. + +## Azure Datacenter Locations + +> [!WARNING] +> TODO: Create a list like languages for datacenters. diff --git a/docs/src/azure-reference/languages.data.mts b/docs/src/azure-reference/languages.data.mts new file mode 100644 index 00000000..7ed8a06d --- /dev/null +++ b/docs/src/azure-reference/languages.data.mts @@ -0,0 +1,33 @@ +import { defineLoader } from 'vitepress' +import data from './azure_available_languages.json' + +export type Languages = { + readonly translation: { [key: string]: Dictionary }; + readonly transliteration: { [key: string]: Transliteration }; + readonly dictionary: { [key: string]: Dictionary }; +} + +export type Dictionary = { + readonly name: string; + readonly nativeName: string; + readonly dir: Dir; + readonly translations?: Dictionary[]; + readonly code?: string; + readonly toScripts?: Dictionary[]; +} + +export type Dir = "ltr" | "rtl"; + +export type Transliteration = { + readonly name: string; + readonly nativeName: string; + readonly scripts: Dictionary[]; +} + +export default defineLoader({ + load() { + return { + azure_response: data as Languages + } + } +}) diff --git a/docs/src/azure-reference/languages.md b/docs/src/azure-reference/languages.md new file mode 100644 index 00000000..2a470b1b --- /dev/null +++ b/docs/src/azure-reference/languages.md @@ -0,0 +1,17 @@ + + +# Azure Available Languages + +The Azure Translator API supports a wide range of languages for translation. This guide provides a list of languages +that are supported by the Azure Translator API. + +## Supported Languages + +> [!TIP] +> You can find the full list of supported languages in the [Azure Translator API documentation](https://docs.microsoft.com/en-us/azure/cognitive-services/translator/language-support). + + diff --git a/docs/src/azure_available_languages.json b/docs/src/azure_available_languages.json deleted file mode 100644 index 66639da8..00000000 --- a/docs/src/azure_available_languages.json +++ /dev/null @@ -1 +0,0 @@ -{"translation":{"af":{"name":"Afrikaans","nativeName":"Afrikaans","dir":"ltr"},"am":{"name":"Amharic","nativeName":"አማርኛ","dir":"ltr"},"ar":{"name":"Arabic","nativeName":"العربية","dir":"rtl"},"as":{"name":"Assamese","nativeName":"অসমীয়া","dir":"ltr"},"az":{"name":"Azerbaijani","nativeName":"Azərbaycan","dir":"ltr"},"ba":{"name":"Bashkir","nativeName":"Bashkir","dir":"ltr"},"bg":{"name":"Bulgarian","nativeName":"Български","dir":"ltr"},"bho":{"name":"Bhojpuri","nativeName":"Bhojpuri","dir":"ltr"},"bn":{"name":"Bangla","nativeName":"বাংলা","dir":"ltr"},"bo":{"name":"Tibetan","nativeName":"བོད་སྐད་","dir":"ltr"},"brx":{"name":"Bodo","nativeName":"बड़ो","dir":"ltr"},"bs":{"name":"Bosnian","nativeName":"Bosnian","dir":"ltr"},"ca":{"name":"Catalan","nativeName":"Català","dir":"ltr"},"cs":{"name":"Czech","nativeName":"Čeština","dir":"ltr"},"cy":{"name":"Welsh","nativeName":"Cymraeg","dir":"ltr"},"da":{"name":"Danish","nativeName":"Dansk","dir":"ltr"},"de":{"name":"German","nativeName":"Deutsch","dir":"ltr"},"doi":{"name":"Dogri","nativeName":"Dogri","dir":"ltr"},"dsb":{"name":"Lower Sorbian","nativeName":"Dolnoserbšćina","dir":"ltr"},"dv":{"name":"Divehi","nativeName":"ދިވެހިބަސް","dir":"rtl"},"el":{"name":"Greek","nativeName":"Ελληνικά","dir":"ltr"},"en":{"name":"English","nativeName":"English","dir":"ltr"},"es":{"name":"Spanish","nativeName":"Español","dir":"ltr"},"et":{"name":"Estonian","nativeName":"Eesti","dir":"ltr"},"eu":{"name":"Basque","nativeName":"Euskara","dir":"ltr"},"fa":{"name":"Persian","nativeName":"فارسی","dir":"rtl"},"fi":{"name":"Finnish","nativeName":"Suomi","dir":"ltr"},"fil":{"name":"Filipino","nativeName":"Filipino","dir":"ltr"},"fj":{"name":"Fijian","nativeName":"Na Vosa Vakaviti","dir":"ltr"},"fo":{"name":"Faroese","nativeName":"Føroyskt","dir":"ltr"},"fr":{"name":"French","nativeName":"Français","dir":"ltr"},"fr-CA":{"name":"French (Canada)","nativeName":"Français (Canada)","dir":"ltr"},"ga":{"name":"Irish","nativeName":"Gaeilge","dir":"ltr"},"gl":{"name":"Galician","nativeName":"Galego","dir":"ltr"},"gom":{"name":"Konkani","nativeName":"Konkani","dir":"ltr"},"gu":{"name":"Gujarati","nativeName":"ગુજરાતી","dir":"ltr"},"ha":{"name":"Hausa","nativeName":"Hausa","dir":"ltr"},"he":{"name":"Hebrew","nativeName":"עברית","dir":"rtl"},"hi":{"name":"Hindi","nativeName":"हिन्दी","dir":"ltr"},"hr":{"name":"Croatian","nativeName":"Hrvatski","dir":"ltr"},"hsb":{"name":"Upper Sorbian","nativeName":"Hornjoserbšćina","dir":"ltr"},"ht":{"name":"Haitian Creole","nativeName":"Haitian Creole","dir":"ltr"},"hu":{"name":"Hungarian","nativeName":"Magyar","dir":"ltr"},"hy":{"name":"Armenian","nativeName":"Հայերեն","dir":"ltr"},"id":{"name":"Indonesian","nativeName":"Indonesia","dir":"ltr"},"ig":{"name":"Igbo","nativeName":"Ásụ̀sụ́ Ìgbò","dir":"ltr"},"ikt":{"name":"Inuinnaqtun","nativeName":"Inuinnaqtun","dir":"ltr"},"is":{"name":"Icelandic","nativeName":"Íslenska","dir":"ltr"},"it":{"name":"Italian","nativeName":"Italiano","dir":"ltr"},"iu":{"name":"Inuktitut","nativeName":"ᐃᓄᒃᑎᑐᑦ","dir":"ltr"},"iu-Latn":{"name":"Inuktitut (Latin)","nativeName":"Inuktitut (Latin)","dir":"ltr"},"ja":{"name":"Japanese","nativeName":"日本語","dir":"ltr"},"ka":{"name":"Georgian","nativeName":"ქართული","dir":"ltr"},"kk":{"name":"Kazakh","nativeName":"Қазақ Тілі","dir":"ltr"},"km":{"name":"Khmer","nativeName":"ខ្មែរ","dir":"ltr"},"kmr":{"name":"Kurdish (Northern)","nativeName":"Kurdî (Bakur)","dir":"ltr"},"kn":{"name":"Kannada","nativeName":"ಕನ್ನಡ","dir":"ltr"},"ko":{"name":"Korean","nativeName":"한국어","dir":"ltr"},"ks":{"name":"Kashmiri","nativeName":"کٲشُر","dir":"rtl"},"ku":{"name":"Kurdish (Central)","nativeName":"Kurdî (Navîn)","dir":"rtl"},"ky":{"name":"Kyrgyz","nativeName":"Кыргызча","dir":"ltr"},"ln":{"name":"Lingala","nativeName":"Lingála","dir":"ltr"},"lo":{"name":"Lao","nativeName":"ລາວ","dir":"ltr"},"lt":{"name":"Lithuanian","nativeName":"Lietuvių","dir":"ltr"},"lug":{"name":"Ganda","nativeName":"Ganda","dir":"ltr"},"lv":{"name":"Latvian","nativeName":"Latviešu","dir":"ltr"},"lzh":{"name":"Chinese (Literary)","nativeName":"中文 (文言文)","dir":"ltr"},"mai":{"name":"Maithili","nativeName":"Maithili","dir":"ltr"},"mg":{"name":"Malagasy","nativeName":"Malagasy","dir":"ltr"},"mi":{"name":"Māori","nativeName":"Te Reo Māori","dir":"ltr"},"mk":{"name":"Macedonian","nativeName":"Македонски","dir":"ltr"},"ml":{"name":"Malayalam","nativeName":"മലയാളം","dir":"ltr"},"mn-Cyrl":{"name":"Mongolian (Cyrillic)","nativeName":"Mongolian (Cyrillic)","dir":"ltr"},"mn-Mong":{"name":"Mongolian (Traditional)","nativeName":"ᠮᠣᠩᠭᠣᠯ ᠬᠡᠯᠡ","dir":"ltr"},"mr":{"name":"Marathi","nativeName":"मराठी","dir":"ltr"},"ms":{"name":"Malay","nativeName":"Melayu","dir":"ltr"},"mt":{"name":"Maltese","nativeName":"Malti","dir":"ltr"},"mww":{"name":"Hmong Daw","nativeName":"Hmong Daw","dir":"ltr"},"my":{"name":"Myanmar (Burmese)","nativeName":"မြန်မာ","dir":"ltr"},"nb":{"name":"Norwegian","nativeName":"Norsk Bokmål","dir":"ltr"},"ne":{"name":"Nepali","nativeName":"नेपाली","dir":"ltr"},"nl":{"name":"Dutch","nativeName":"Nederlands","dir":"ltr"},"nso":{"name":"Sesotho sa Leboa","nativeName":"Sesotho sa Leboa","dir":"ltr"},"nya":{"name":"Nyanja","nativeName":"Nyanja","dir":"ltr"},"or":{"name":"Odia","nativeName":"ଓଡ଼ିଆ","dir":"ltr"},"otq":{"name":"Querétaro Otomi","nativeName":"Hñähñu","dir":"ltr"},"pa":{"name":"Punjabi","nativeName":"ਪੰਜਾਬੀ","dir":"ltr"},"pl":{"name":"Polish","nativeName":"Polski","dir":"ltr"},"prs":{"name":"Dari","nativeName":"دری","dir":"rtl"},"ps":{"name":"Pashto","nativeName":"پښتو","dir":"rtl"},"pt":{"name":"Portuguese (Brazil)","nativeName":"Português (Brasil)","dir":"ltr"},"pt-PT":{"name":"Portuguese (Portugal)","nativeName":"Português (Portugal)","dir":"ltr"},"ro":{"name":"Romanian","nativeName":"Română","dir":"ltr"},"ru":{"name":"Russian","nativeName":"Русский","dir":"ltr"},"run":{"name":"Rundi","nativeName":"Rundi","dir":"ltr"},"rw":{"name":"Kinyarwanda","nativeName":"Kinyarwanda","dir":"ltr"},"sd":{"name":"Sindhi","nativeName":"سنڌي","dir":"rtl"},"si":{"name":"Sinhala","nativeName":"සිංහල","dir":"ltr"},"sk":{"name":"Slovak","nativeName":"Slovenčina","dir":"ltr"},"sl":{"name":"Slovenian","nativeName":"Slovenščina","dir":"ltr"},"sm":{"name":"Samoan","nativeName":"Gagana Sāmoa","dir":"ltr"},"sn":{"name":"Shona","nativeName":"chiShona","dir":"ltr"},"so":{"name":"Somali","nativeName":"Soomaali","dir":"ltr"},"sq":{"name":"Albanian","nativeName":"Shqip","dir":"ltr"},"sr-Cyrl":{"name":"Serbian (Cyrillic)","nativeName":"Српски (ћирилица)","dir":"ltr"},"sr-Latn":{"name":"Serbian (Latin)","nativeName":"Srpski (latinica)","dir":"ltr"},"st":{"name":"Sesotho","nativeName":"Sesotho","dir":"ltr"},"sv":{"name":"Swedish","nativeName":"Svenska","dir":"ltr"},"sw":{"name":"Swahili","nativeName":"Kiswahili","dir":"ltr"},"ta":{"name":"Tamil","nativeName":"தமிழ்","dir":"ltr"},"te":{"name":"Telugu","nativeName":"తెలుగు","dir":"ltr"},"th":{"name":"Thai","nativeName":"ไทย","dir":"ltr"},"ti":{"name":"Tigrinya","nativeName":"ትግር","dir":"ltr"},"tk":{"name":"Turkmen","nativeName":"Türkmen Dili","dir":"ltr"},"tlh-Latn":{"name":"Klingon (Latin)","nativeName":"Klingon (Latin)","dir":"ltr"},"tlh-Piqd":{"name":"Klingon (pIqaD)","nativeName":"Klingon (pIqaD)","dir":"ltr"},"tn":{"name":"Setswana","nativeName":"Setswana","dir":"ltr"},"to":{"name":"Tongan","nativeName":"Lea Fakatonga","dir":"ltr"},"tr":{"name":"Turkish","nativeName":"Türkçe","dir":"ltr"},"tt":{"name":"Tatar","nativeName":"Татар","dir":"ltr"},"ty":{"name":"Tahitian","nativeName":"Reo Tahiti","dir":"ltr"},"ug":{"name":"Uyghur","nativeName":"ئۇيغۇرچە","dir":"rtl"},"uk":{"name":"Ukrainian","nativeName":"Українська","dir":"ltr"},"ur":{"name":"Urdu","nativeName":"اردو","dir":"rtl"},"uz":{"name":"Uzbek (Latin)","nativeName":"Uzbek (Latin)","dir":"ltr"},"vi":{"name":"Vietnamese","nativeName":"Tiếng Việt","dir":"ltr"},"xh":{"name":"Xhosa","nativeName":"isiXhosa","dir":"ltr"},"yo":{"name":"Yoruba","nativeName":"Èdè Yorùbá","dir":"ltr"},"yua":{"name":"Yucatec Maya","nativeName":"Yucatec Maya","dir":"ltr"},"yue":{"name":"Cantonese (Traditional)","nativeName":"粵語 (繁體)","dir":"ltr"},"zh-Hans":{"name":"Chinese Simplified","nativeName":"中文 (简体)","dir":"ltr"},"zh-Hant":{"name":"Chinese Traditional","nativeName":"繁體中文 (繁體)","dir":"ltr"},"zu":{"name":"Zulu","nativeName":"Isi-Zulu","dir":"ltr"}},"transliteration":{"ar":{"name":"Arabic","nativeName":"العربية","scripts":[{"code":"Arab","name":"Arabic","nativeName":"العربية","dir":"rtl","toScripts":[{"code":"Latn","name":"Latin","nativeName":"اللاتينية","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"اللاتينية","dir":"ltr","toScripts":[{"code":"Arab","name":"Arabic","nativeName":"العربية","dir":"rtl"}]}]},"as":{"name":"Assamese","nativeName":"অসমীয়া","scripts":[{"code":"Beng","name":"Bengali","nativeName":"বাংলা","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"লেটিন","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"লেটিন","dir":"ltr","toScripts":[{"code":"Beng","name":"Bangla","nativeName":"বাংলা","dir":"ltr"}]}]},"be":{"name":"Belarusian","nativeName":"беларуская","scripts":[{"code":"Cyrl","name":"Cyrillic","nativeName":"Кірыліца","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"Лацініца","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"Лацініца","dir":"ltr","toScripts":[{"code":"Cyrl","name":"Cyrillic","nativeName":"Кірыліца","dir":"ltr"}]}]},"bg":{"name":"Bulgarian","nativeName":"Български","scripts":[{"code":"Cyrl","name":"Cyrillic","nativeName":"кирилица","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"латиница","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"латиница","dir":"ltr","toScripts":[{"code":"Cyrl","name":"Cyrillic","nativeName":"кирилица","dir":"ltr"}]}]},"bn":{"name":"Bangla","nativeName":"বাংলা","scripts":[{"code":"Beng","name":"Bengali","nativeName":"বাংলা","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"ল্যাটিন","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"ল্যাটিন","dir":"ltr","toScripts":[{"code":"Beng","name":"Bangla","nativeName":"বাংলা","dir":"ltr"}]}]},"brx":{"name":"Bodo","nativeName":"बड़ो","scripts":[{"code":"Deva","name":"Devanagari","nativeName":"Devanagari","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"Latin","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"Latin","dir":"ltr","toScripts":[{"code":"Deva","name":"Devanagari","nativeName":"Devanagari","dir":"ltr"}]}]},"el":{"name":"Greek","nativeName":"Ελληνικά","scripts":[{"code":"Grek","name":"Greek","nativeName":"ελληνικό","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"λατινικό","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"λατινικό","dir":"ltr","toScripts":[{"code":"Grek","name":"Greek","nativeName":"ελληνικό","dir":"ltr"}]}]},"fa":{"name":"Persian","nativeName":"فارسی","scripts":[{"code":"Arab","name":"Arabic","nativeName":"عربی","dir":"rtl","toScripts":[{"code":"Latn","name":"Latin","nativeName":"لاتین","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"لاتین","dir":"ltr","toScripts":[{"code":"Arab","name":"Arabic","nativeName":"عربی","dir":"rtl"}]}]},"gom":{"name":"Konkani","nativeName":"Konkani","scripts":[{"code":"Deva","name":"Devanagari","nativeName":"Devanagari","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"Latin","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"Latin","dir":"ltr","toScripts":[{"code":"Deva","name":"Devanagari","nativeName":"Devanagari","dir":"ltr"}]}]},"gu":{"name":"Gujarati","nativeName":"ગુજરાતી","scripts":[{"code":"Gujr","name":"Gujarati","nativeName":"ગુજરાતી","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"લેટિન","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"લેટિન","dir":"ltr","toScripts":[{"code":"Gujr","name":"Gujarati","nativeName":"ગુજરાતી","dir":"ltr"}]}]},"he":{"name":"Hebrew","nativeName":"עברית","scripts":[{"code":"Hebr","name":"Hebrew","nativeName":"עברי","dir":"rtl","toScripts":[{"code":"Latn","name":"Latin","nativeName":"לטיני","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"לטיני","dir":"ltr","toScripts":[{"code":"Hebr","name":"Hebrew","nativeName":"עברי","dir":"rtl"}]}]},"hi":{"name":"Hindi","nativeName":"हिन्दी","scripts":[{"code":"Deva","name":"Devanagari","nativeName":"देवनागरी","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"लैटिन","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"लैटिन","dir":"ltr","toScripts":[{"code":"Deva","name":"Devanagari","nativeName":"देवनागरी","dir":"ltr"}]}]},"ja":{"name":"Japanese","nativeName":"日本語","scripts":[{"code":"Jpan","name":"Japanese","nativeName":"日本語の文字","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"ラテン文字","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"ラテン文字","dir":"ltr","toScripts":[{"code":"Jpan","name":"Japanese","nativeName":"日本語の文字","dir":"ltr"}]}]},"kk":{"name":"Kazakh","nativeName":"Қазақ Тілі","scripts":[{"code":"Cyrl","name":"Cyrillic","nativeName":"кирилл жазуы","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"латын жазуы","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"латын жазуы","dir":"ltr","toScripts":[{"code":"Cyrl","name":"Cyrillic","nativeName":"кирилл жазуы","dir":"ltr"}]}]},"kn":{"name":"Kannada","nativeName":"ಕನ್ನಡ","scripts":[{"code":"Knda","name":"Kannada","nativeName":"ಕನ್ನಡ","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"ಲ್ಯಾಟಿನ್","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"ಲ್ಯಾಟಿನ್","dir":"ltr","toScripts":[{"code":"Knda","name":"Kannada","nativeName":"ಕನ್ನಡ","dir":"ltr"}]}]},"ko":{"name":"Korean","nativeName":"한국어","scripts":[{"code":"Kore","name":"Korean","nativeName":"한국 문자","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"로마자","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"로마자","dir":"ltr","toScripts":[{"code":"Kore","name":"Korean","nativeName":"한국 문자","dir":"ltr"}]}]},"ks":{"name":"Kashmiri","nativeName":"کٲشُر","scripts":[{"code":"Arab","name":"Arabic","nativeName":"Arabic","dir":"rtl","toScripts":[{"code":"Latn","name":"Latin","nativeName":"Latin","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"Latin","dir":"ltr","toScripts":[{"code":"Arab","name":"Arabic","nativeName":"Arabic","dir":"rtl"}]}]},"ky":{"name":"Kyrgyz","nativeName":"Кыргызча","scripts":[{"code":"Cyrl","name":"Cyrillic","nativeName":"кирилл","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"латын","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"латын","dir":"ltr","toScripts":[{"code":"Cyrl","name":"Cyrillic","nativeName":"кирилл","dir":"ltr"}]}]},"mai":{"name":"Maithili","nativeName":"Maithili","scripts":[{"code":"Deva","name":"Devanagari","nativeName":"Devanagari","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"Latin","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"Latin","dir":"ltr","toScripts":[{"code":"Deva","name":"Devanagari","nativeName":"Devanagari","dir":"ltr"}]}]},"mk":{"name":"Macedonian","nativeName":"Македонски","scripts":[{"code":"Cyrl","name":"Cyrillic","nativeName":"кирилско писмо","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"латинично писмо","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"латинично писмо","dir":"ltr","toScripts":[{"code":"Cyrl","name":"Cyrillic","nativeName":"кирилско писмо","dir":"ltr"}]}]},"ml":{"name":"Malayalam","nativeName":"മലയാളം","scripts":[{"code":"Mlym","name":"Malayalam","nativeName":"മലയാളം","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"ലാറ്റിൻ","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"ലാറ്റിൻ","dir":"ltr","toScripts":[{"code":"Mlym","name":"Malayalam","nativeName":"മലയാളം","dir":"ltr"}]}]},"mn-Cyrl":{"name":"Mongolian (Cyrillic)","nativeName":"Mongolian (Cyrillic)","scripts":[{"code":"Cyrl","name":"Cyrillic","nativeName":"кирилл","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"латин","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"латин","dir":"ltr","toScripts":[{"code":"Cyrl","name":"Cyrillic","nativeName":"кирилл","dir":"ltr"}]}]},"mni":{"name":"Manipuri","nativeName":"মৈতৈলোন্","scripts":[{"code":"Beng","name":"Bengali","nativeName":"Bengali","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"Latin","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"Latin","dir":"ltr","toScripts":[{"code":"Beng","name":"Bangla","nativeName":"Bengali","dir":"ltr"}]}]},"mr":{"name":"Marathi","nativeName":"मराठी","scripts":[{"code":"Deva","name":"Devanagari","nativeName":"देवनागरी","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"लॅटिन","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"लॅटिन","dir":"ltr","toScripts":[{"code":"Deva","name":"Devanagari","nativeName":"देवनागरी","dir":"ltr"}]}]},"ne":{"name":"Nepali","nativeName":"नेपाली","scripts":[{"code":"Deva","name":"Devanagari","nativeName":"देवानागरी","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"ल्याटिन","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"ल्याटिन","dir":"ltr","toScripts":[{"code":"Deva","name":"Devanagari","nativeName":"देवानागरी","dir":"ltr"}]}]},"or":{"name":"Odia","nativeName":"ଓଡ଼ିଆ","scripts":[{"code":"Orya","name":"Odia","nativeName":"ଓଡ଼ିଆ","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"ଲାଟିନ୍","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"ଲାଟିନ୍","dir":"ltr","toScripts":[{"code":"Orya","name":"Odia","nativeName":"ଓଡ଼ିଆ","dir":"ltr"}]}]},"pa":{"name":"Punjabi","nativeName":"ਪੰਜਾਬੀ","scripts":[{"code":"Guru","name":"Gurmukhi","nativeName":"ਗੁਰਮੁਖੀ","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"ਲਾਤੀਨੀ","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"ਲਾਤੀਨੀ","dir":"ltr","toScripts":[{"code":"Guru","name":"Gurmukhi","nativeName":"ਗੁਰਮੁਖੀ","dir":"ltr"}]}]},"ru":{"name":"Russian","nativeName":"Русский","scripts":[{"code":"Cyrl","name":"Cyrillic","nativeName":"кириллица","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"латиница","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"латиница","dir":"ltr","toScripts":[{"code":"Cyrl","name":"Cyrillic","nativeName":"кириллица","dir":"ltr"}]}]},"sa":{"name":"Sanskrit","nativeName":"संस्कृत","scripts":[{"code":"Deva","name":"Devanagari","nativeName":"Devanagari","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"Latin","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"Latin","dir":"ltr","toScripts":[{"code":"Deva","name":"Devanagari","nativeName":"Devanagari","dir":"ltr"}]}]},"sd":{"name":"Sindhi","nativeName":"سنڌي","scripts":[{"code":"Arab","name":"Arabic","nativeName":"عربي","dir":"rtl","toScripts":[{"code":"Latn","name":"Latin","nativeName":"لاطيني","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"لاطيني","dir":"ltr","toScripts":[{"code":"Arab","name":"Arabic","nativeName":"عربي","dir":"rtl"}]}]},"si":{"name":"Sinhala","nativeName":"සිංහල","scripts":[{"code":"Sinh","name":"Sinhala","nativeName":"සිංහල","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"ලතින්","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"ලතින්","dir":"ltr","toScripts":[{"code":"Sinh","name":"Sinhala","nativeName":"සිංහල","dir":"ltr"}]}]},"sr-Cyrl":{"name":"Serbian (Cyrillic)","nativeName":"Српски (ћирилица)","scripts":[{"code":"Cyrl","name":"Cyrillic","nativeName":"ћирилица","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"latinica","dir":"ltr"}]}]},"sr-Latn":{"name":"Serbian (Latin)","nativeName":"Srpski (latinica)","scripts":[{"code":"Latn","name":"Latin","nativeName":"latinica","dir":"ltr","toScripts":[{"code":"Cyrl","name":"Cyrillic","nativeName":"ćirilica","dir":"ltr"}]}]},"ta":{"name":"Tamil","nativeName":"தமிழ்","scripts":[{"code":"Taml","name":"Tamil","nativeName":"தமிழ்","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"லத்தின்","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"லத்தின்","dir":"ltr","toScripts":[{"code":"Taml","name":"Tamil","nativeName":"தமிழ்","dir":"ltr"}]}]},"te":{"name":"Telugu","nativeName":"తెలుగు","scripts":[{"code":"Telu","name":"Telugu","nativeName":"తెలుగు","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"లాటిన్","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"లాటిన్","dir":"ltr","toScripts":[{"code":"Telu","name":"Telugu","nativeName":"తెలుగు","dir":"ltr"}]}]},"tg":{"name":"Tajik","nativeName":"Tajik (Cyrillic)","scripts":[{"code":"Cyrl","name":"Cyrillic","nativeName":"Кириллӣ","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"Лотинӣ","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"Лотинӣ","dir":"ltr","toScripts":[{"code":"Cyrl","name":"Cyrillic","nativeName":"Кириллӣ","dir":"ltr"}]}]},"th":{"name":"Thai","nativeName":"ไทย","scripts":[{"code":"Thai","name":"Thai","nativeName":"ไทย","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"ละติน","dir":"ltr"}]}]},"tt":{"name":"Tatar","nativeName":"Татар","scripts":[{"code":"Cyrl","name":"Cyrillic","nativeName":"кирилл","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"латин","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"латин","dir":"ltr","toScripts":[{"code":"Cyrl","name":"Cyrillic","nativeName":"кирилл","dir":"ltr"}]}]},"uk":{"name":"Ukrainian","nativeName":"Українська","scripts":[{"code":"Cyrl","name":"Cyrillic","nativeName":"кирилиця","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"латиниця","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"латиниця","dir":"ltr","toScripts":[{"code":"Cyrl","name":"Cyrillic","nativeName":"кирилиця","dir":"ltr"}]}]},"ur":{"name":"Urdu","nativeName":"اردو","scripts":[{"code":"Arab","name":"Arabic","nativeName":"عربی","dir":"rtl","toScripts":[{"code":"Latn","name":"Latin","nativeName":"لاطینی","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"لاطینی","dir":"ltr","toScripts":[{"code":"Arab","name":"Arabic","nativeName":"عربی","dir":"rtl"}]}]},"zh-Hans":{"name":"Chinese Simplified","nativeName":"中文 (简体)","scripts":[{"code":"Hans","name":"Simplified","nativeName":"简体汉语","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"拉丁语","dir":"ltr"},{"code":"Hant","name":"Hat","nativeName":"传统","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"拉丁语","dir":"ltr","toScripts":[{"code":"Hans","name":"Han","nativeName":"简体汉语","dir":"ltr"},{"code":"Hant","name":"Hat","nativeName":"传统","dir":"ltr"}]}]},"zh-Hant":{"name":"Chinese Traditional","nativeName":"繁體中文 (繁體)","scripts":[{"code":"Hant","name":"Traditional","nativeName":"傳統","dir":"ltr","toScripts":[{"code":"Latn","name":"Latin","nativeName":"拉丁语","dir":"ltr"},{"code":"Hans","name":"Han","nativeName":"简体汉语","dir":"ltr"}]},{"code":"Latn","name":"Latin","nativeName":"拉丁文","dir":"ltr","toScripts":[{"code":"Hans","name":"Han","nativeName":"简体汉语","dir":"ltr"},{"code":"Hant","name":"Hat","nativeName":"传统","dir":"ltr"}]}]}},"dictionary":{"af":{"name":"Afrikaans","nativeName":"Afrikaans","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"ar":{"name":"Arabic","nativeName":"العربية","dir":"rtl","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"bg":{"name":"Bulgarian","nativeName":"Български","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"bn":{"name":"Bangla","nativeName":"বাংলা","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"bs":{"name":"Bosnian","nativeName":"Bosnian","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"ca":{"name":"Catalan","nativeName":"Català","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"cs":{"name":"Czech","nativeName":"Čeština","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"cy":{"name":"Welsh","nativeName":"Cymraeg","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"da":{"name":"Danish","nativeName":"Dansk","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"de":{"name":"German","nativeName":"Deutsch","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"el":{"name":"Greek","nativeName":"Ελληνικά","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"en":{"name":"English","nativeName":"English","dir":"ltr","translations":[{"name":"Afrikaans","nativeName":"Afrikaans","dir":"ltr","code":"af"},{"name":"Arabic","nativeName":"العربية","dir":"rtl","code":"ar"},{"name":"Bulgarian","nativeName":"Български","dir":"ltr","code":"bg"},{"name":"Bangla","nativeName":"বাংলা","dir":"ltr","code":"bn"},{"name":"Bosnian","nativeName":"Bosnian","dir":"ltr","code":"bs"},{"name":"Catalan","nativeName":"Català","dir":"ltr","code":"ca"},{"name":"Chinese Simplified","nativeName":"中文 (简体)","dir":"ltr","code":"zh-Hans"},{"name":"Czech","nativeName":"Čeština","dir":"ltr","code":"cs"},{"name":"Welsh","nativeName":"Cymraeg","dir":"ltr","code":"cy"},{"name":"Danish","nativeName":"Dansk","dir":"ltr","code":"da"},{"name":"German","nativeName":"Deutsch","dir":"ltr","code":"de"},{"name":"Greek","nativeName":"Ελληνικά","dir":"ltr","code":"el"},{"name":"Spanish","nativeName":"Español","dir":"ltr","code":"es"},{"name":"Estonian","nativeName":"Eesti","dir":"ltr","code":"et"},{"name":"Persian","nativeName":"فارسی","dir":"rtl","code":"fa"},{"name":"Finnish","nativeName":"Suomi","dir":"ltr","code":"fi"},{"name":"French","nativeName":"Français","dir":"ltr","code":"fr"},{"name":"Hebrew","nativeName":"עברית","dir":"rtl","code":"he"},{"name":"Hindi","nativeName":"हिन्दी","dir":"ltr","code":"hi"},{"name":"Croatian","nativeName":"Hrvatski","dir":"ltr","code":"hr"},{"name":"Hungarian","nativeName":"Magyar","dir":"ltr","code":"hu"},{"name":"Indonesian","nativeName":"Indonesia","dir":"ltr","code":"id"},{"name":"Icelandic","nativeName":"Íslenska","dir":"ltr","code":"is"},{"name":"Italian","nativeName":"Italiano","dir":"ltr","code":"it"},{"name":"Japanese","nativeName":"日本語","dir":"ltr","code":"ja"},{"name":"Korean","nativeName":"한국어","dir":"ltr","code":"ko"},{"name":"Lithuanian","nativeName":"Lietuvių","dir":"ltr","code":"lt"},{"name":"Latvian","nativeName":"Latviešu","dir":"ltr","code":"lv"},{"name":"Maltese","nativeName":"Malti","dir":"ltr","code":"mt"},{"name":"Malay","nativeName":"Melayu","dir":"ltr","code":"ms"},{"name":"Hmong Daw","nativeName":"Hmong Daw","dir":"ltr","code":"mww"},{"name":"Dutch","nativeName":"Nederlands","dir":"ltr","code":"nl"},{"name":"Norwegian","nativeName":"Norsk Bokmål","dir":"ltr","code":"nb"},{"name":"Polish","nativeName":"Polski","dir":"ltr","code":"pl"},{"name":"Portuguese (Brazil)","nativeName":"Português (Brasil)","dir":"ltr","code":"pt"},{"name":"Romanian","nativeName":"Română","dir":"ltr","code":"ro"},{"name":"Russian","nativeName":"Русский","dir":"ltr","code":"ru"},{"name":"Slovak","nativeName":"Slovenčina","dir":"ltr","code":"sk"},{"name":"Slovenian","nativeName":"Slovenščina","dir":"ltr","code":"sl"},{"name":"Serbian (Latin)","nativeName":"Srpski (latinica)","dir":"ltr","code":"sr-Latn"},{"name":"Swedish","nativeName":"Svenska","dir":"ltr","code":"sv"},{"name":"Swahili","nativeName":"Kiswahili","dir":"ltr","code":"sw"},{"name":"Tamil","nativeName":"தமிழ்","dir":"ltr","code":"ta"},{"name":"Thai","nativeName":"ไทย","dir":"ltr","code":"th"},{"name":"Klingon (Latin)","nativeName":"Klingon (Latin)","dir":"ltr","code":"tlh-Latn"},{"name":"Turkish","nativeName":"Türkçe","dir":"ltr","code":"tr"},{"name":"Ukrainian","nativeName":"Українська","dir":"ltr","code":"uk"},{"name":"Urdu","nativeName":"اردو","dir":"rtl","code":"ur"},{"name":"Vietnamese","nativeName":"Tiếng Việt","dir":"ltr","code":"vi"}]},"es":{"name":"Spanish","nativeName":"Español","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"et":{"name":"Estonian","nativeName":"Eesti","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"fa":{"name":"Persian","nativeName":"فارسی","dir":"rtl","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"fi":{"name":"Finnish","nativeName":"Suomi","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"fr":{"name":"French","nativeName":"Français","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"he":{"name":"Hebrew","nativeName":"עברית","dir":"rtl","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"hi":{"name":"Hindi","nativeName":"हिन्दी","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"hr":{"name":"Croatian","nativeName":"Hrvatski","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"hu":{"name":"Hungarian","nativeName":"Magyar","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"id":{"name":"Indonesian","nativeName":"Indonesia","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"is":{"name":"Icelandic","nativeName":"Íslenska","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"it":{"name":"Italian","nativeName":"Italiano","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"ja":{"name":"Japanese","nativeName":"日本語","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"ko":{"name":"Korean","nativeName":"한국어","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"lt":{"name":"Lithuanian","nativeName":"Lietuvių","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"lv":{"name":"Latvian","nativeName":"Latviešu","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"ms":{"name":"Malay","nativeName":"Melayu","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"mt":{"name":"Maltese","nativeName":"Malti","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"mww":{"name":"Hmong Daw","nativeName":"Hmong Daw","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"nb":{"name":"Norwegian","nativeName":"Norsk Bokmål","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"nl":{"name":"Dutch","nativeName":"Nederlands","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"pl":{"name":"Polish","nativeName":"Polski","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"pt":{"name":"Portuguese (Brazil)","nativeName":"Português (Brasil)","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"ro":{"name":"Romanian","nativeName":"Română","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"ru":{"name":"Russian","nativeName":"Русский","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"sk":{"name":"Slovak","nativeName":"Slovenčina","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"sl":{"name":"Slovenian","nativeName":"Slovenščina","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"sr-Latn":{"name":"Serbian (Latin)","nativeName":"Srpski (latinica)","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"sv":{"name":"Swedish","nativeName":"Svenska","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"sw":{"name":"Swahili","nativeName":"Kiswahili","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"ta":{"name":"Tamil","nativeName":"தமிழ்","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"th":{"name":"Thai","nativeName":"ไทย","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"tlh-Latn":{"name":"Klingon (Latin)","nativeName":"Klingon (Latin)","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"tr":{"name":"Turkish","nativeName":"Türkçe","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"uk":{"name":"Ukrainian","nativeName":"Українська","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"ur":{"name":"Urdu","nativeName":"اردو","dir":"rtl","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"vi":{"name":"Vietnamese","nativeName":"Tiếng Việt","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]},"zh-Hans":{"name":"Chinese Simplified","nativeName":"中文 (简体)","dir":"ltr","translations":[{"name":"English","nativeName":"English","dir":"ltr","code":"en"}]}}} \ No newline at end of file diff --git a/docs/src/error-reference/index.md b/docs/src/error-reference/index.md index 1aaf4b87..fc1f04a8 100644 --- a/docs/src/error-reference/index.md +++ b/docs/src/error-reference/index.md @@ -1,17 +1,15 @@ -# Production Error Code Reference {#error-reference} - -## Azure Errors {#azure-errors} +# Azure Error Code Reference {#azure-errors} The following table maps the codes to their original full information strings. diff --git a/docs/src/essential/completable-futures.md b/docs/src/essential/completable-futures.md new file mode 100644 index 00000000..2f54fb8e --- /dev/null +++ b/docs/src/essential/completable-futures.md @@ -0,0 +1,163 @@ +--- +footer: false +--- + +# What is the `CompletableFuture` API? {#completable-future} + +> [!WARNING] +> +> This tutorial assumes that you are familiar with [lambda expressions](https://www.w3schools.com/java/java_lambda.asp). Take a look at the lambda introduction first if +> you are not! + +AT4J uses Futures for asynchronous requests. To understand how AT4J works, +you must understand the concept of +[Futures](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Future.html) +in general, as well as their most common implementation, the +[CompletableFuture](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html). + +`CompletableFuture` is a class introduced in Java 8 that represents a future result of an asynchronous computation. +It is a part of the `java.util.concurrent` package and is used for asynchronous programming in Java. + +This little introduction gives you a quick overview of the basics you need to know to work with Futures. + +## What is a `Future`? + +A `Future` is a placeholder for a result that is not yet available. It represents the result of an asynchronous +computation. + +This is useful if a method call requires some time and should not block the execution of your current code. You can see +the difference with a primitive speed comparison: + +```java +long currentTime = System.currentTimeMillis(); +TranslateParams params = + new TranslateParams("Hello World!", List.of("pt", "es", "fr")); + +azureApi.translate(params); +azureApi.translate(params); +azureApi.translate(params); +azureApi.translate(params); +azureApi.translate(params); + +System.out.println((System.currentTimeMillis() - currentTime) + " ms"); +``` + +```java +long currentTime = System.currentTimeMillis(); +TranslateParams params = + new TranslateParams("Hello World!", List.of("pt", "es", "fr")); + +azureApi.translate(params).join(); +azureApi.translate(params).join(); +azureApi.translate(params).join(); +azureApi.translate(params).join(); +azureApi.translate(params).join(); + +System.out.println((System.currentTimeMillis() - currentTime) + " ms"); +``` + +The first example will take a few milliseconds to execute, while the second example will take a few seconds to execute. +This is because the first example does not wait for the result of the `translate` method, while the second example waits +for the result of each `translate` method call. + +## `CompletableFuture` Methods + +### `join()` + +> [!CAUTION] +> The `join` method is a blocking operation, which means that it will wait for the result of the `CompletableFuture` to +> be +> available. If the computation fails, a `CompletionException` will be thrown. +> It is recommended to use the `join` method only when you are sure that the computation will succeed. +> Avoid using the `join` method in production code, and methods which will be called by other methods, as it can lead to +> deadlocks. + +The `join` method is used to wait for the result of the `CompletableFuture`. It returns the result of the computation +when it is done or throws a `CompletionException` if anything failed. + +The following example demonstrates how to use the `join` method: + +```java +TranslateParams params = + new TranslateParams("Hello World!", List.of("pt", "es", "fr")); + +Optional translationResult = azureApi.translate(params).join(); + +translationResult.ifPresent( + response -> response.getFirstResult().getTranslations().forEach(System.out::println)); +``` + +This example translates the text "Hello World!" into Portuguese, Spanish, and French. The `join` method waits for the +result of the translation and prints the translations to the console. + +> [!TIP] +> While join() can become a performance issue when you call it very frequently, it is very convenient to use and easy to +> understand. If you are new to programming and just want to get your first application working, this is a good method to start +> with. +> Once you gathered more experience, we highly advise against using `join()` as it negatively impacts the performance +> of your application. + +### `thenAccept()` + +The `thenAccept` method is used to perform an action when the `CompletableFuture` completes. It takes a `Consumer` as a +parameter, which is called with the result of the computation when it is done. + +The following example demonstrates how to use the `thenAccept` method: + +```java +TranslateParams params = + new TranslateParams("Hello World!", List.of("pt", "es", "fr")); + +azureApi.translate(params).thenAccept( + response -> response.getFirstResult().getTranslations().forEach(System.out::println)); +``` + +> [!CAUTION] +> The example above does not handle exceptions. If the translation fails, the exception will be thrown and not caught. +> This can lead to unexpected behavior in your application and make it harder to debug. +> It is recommended to use the `exceptionally` method to handle exceptions. + +### `exceptionally(...)` + +The `exceptionally` method is used to handle exceptions that occur during the computation of the `CompletableFuture`. It +takes a `Function` as a parameter, which is called with the exception when it occurs. + +The following example demonstrates how to use the `exceptionally` method: + +```java +TranslateParams params = + new TranslateParams("Hello World!", List.of("pt", "es", "fr")); + +azureApi.translate(params).exceptionally( + exception -> { + System.err.println("An error occurred: " + exception.getMessage()); + return null; + }).thenAccept( + response -> response.getFirstResult().getTranslations().forEach(System.out::println)); +``` + +### `thenCompose()` + +The `thenCompose` method is used to chain multiple `CompletableFuture` instances together. It takes a `Function` as a +parameter, which is called with the result of the computation when it is done. + +The following example demonstrates how to use the `thenCompose` method: + +```java +TranslateParams params = + new TranslateParams("Hello World!", List.of("pt", "es", "fr")); + +azureApi.translate(params).thenCompose( + response -> azureApi.translate(params)).thenAccept( + response -> response.getFirstResult().getTranslations().forEach(System.out::println)); +``` + +## Further Reading + +To learn more about `CompletableFuture`, check out the following resources: + +- [Java 8 CompletableFuture Tutorial](https://www.baeldung.com/java-completablefuture) +- [Java 8 CompletableFuture API](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html) +- [Java 8 CompletableFuture Javadoc](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html) +- [Java 8 CompletableFuture Tutorial](https://www.callicoder.com/java-8-completablefuture-tutorial/) + diff --git a/docs/src/essential/error-handling.md b/docs/src/essential/error-handling.md new file mode 100644 index 00000000..56ed33a6 --- /dev/null +++ b/docs/src/essential/error-handling.md @@ -0,0 +1,4 @@ +# Error Handling + +> [!WARNING] +> TODO: Add more information about error handling in AT4J. diff --git a/docs/src/essential/logging.md b/docs/src/essential/logging.md new file mode 100644 index 00000000..2c45ca6b --- /dev/null +++ b/docs/src/essential/logging.md @@ -0,0 +1,7 @@ +# Logging + +AT4J uses the [SLF4J](http://www.slf4j.org/) logging facade. This allows you to use your favorite logging framework with +AT4J. By default, AT4J uses the `org.slf4j.Logger` interface to log messages. + +> [!WARNING] +> TODO: Add more information about logging in AT4J. diff --git a/docs/src/essential/optionals.md b/docs/src/essential/optionals.md new file mode 100644 index 00000000..e4cd9d93 --- /dev/null +++ b/docs/src/essential/optionals.md @@ -0,0 +1,127 @@ +--- +footer: false +--- + +# What are `Optional` types? {#optional} + +Basically, every method that might return a `null` value will return an Optional in AT4J. This is a way to +avoid `NullPointerException`s in your code. This type was introduced in Java 8 and +is a container object that may or may not contain a non-null value. If a value is present, `isPresent()` will +return `true`, and `get()` will return the value. + +Old code: + +```java + TranslationResponse translation = azureApi.translate(text).join(); + if (translation != null) { + translation.getFirstResult().getTranslations().forEach(ExampleApi::log); + } +``` + +New code: + +```java + azureApi.translate(text).ifPresent(response -> + response.getFirstResult().getTranslations().forEach(ExampleApi::log)); +``` + +You can imagine an Optional like a box that may or may not contain a value. Before accessing this value, you have to +unpack this box first. + +## Methods + +### `get()` + +> [!CAUTION] +> You should avoid using the `get` method as it can throw a `NoSuchElementException` if the value is not present. +> It is recommended to use the `isPresent` method to check if the value is present before calling the `get` method. +> If you are sure that the value is present, you can use the `orElse` method to provide a default value if the value is +> not present. + +The `get` method returns the value if present, otherwise throws a `NoSuchElementException`. + +```java +TranslationResponse translation = azureApi.translate(text).get(); +translation.getFirstResult().getTranslations().forEach(ExampleApi::log); +``` + +### `isPresent()` + +The `isPresent` method returns `true` if the `Optional` contains a non-null value, otherwise `false`. + +```java +Optional translation = azureApi.translate(text); +if (translation.isPresent()) { + translation.get().getFirstResult().getTranslations().forEach(ExampleApi::log); +} +``` + +### `ifPresent(Consumer consumer)` + +The `ifPresent` method takes a `Consumer` as an argument and executes the consumer if the `Optional` contains a non-null +value. + +```java +azureApi.translate(text).ifPresent(response -> + response.getFirstResult().getTranslations().forEach(ExampleApi::log)); +``` + +### `orElse(T other)` + +The `orElse` method returns the value if present, otherwise returns the specified value. + +```java +TranslationResponse translation = azureApi.translate(text).orElse(new TranslationResponse()); +translation.getFirstResult().getTranslations().forEach(ExampleApi::log); +``` + +### `orElseGet(Supplier other)` + +The `orElseGet` method returns the value if present, otherwise returns the result of the specified `Supplier`. + +```java +TranslationResponse translation = azureApi.translate(text).orElseGet(() -> new TranslationResponse()); +translation.getFirstResult().getTranslations().forEach(ExampleApi::log); +``` + +### `orElseThrow()` + +The `orElseThrow` method returns the value if present, otherwise throws an exception. + +```java +TranslationResponse translation = azureApi.translate(text).orElseThrow(); +translation.getFirstResult().getTranslations().forEach(ExampleApi::log); +``` + +### `map(Function mapper)` + +The `map` method applies the given function to the value if present, otherwise returns an empty `Optional`. + +```java +Optional translation = azureApi.translate(text).map(response -> response.getFirstResult().getTranslations().getFirst().getText()); +translation.ifPresent(System.out::println); +``` + +### `filter(Predicate predicate)` + +The `filter` method returns an `Optional` containing the value if present and the value matches the given predicate, + +```java +Optional translation = azureApi.translate(text).flatMap(response -> response.getFirstResult().getTranslations().stream().findFirst()); +translation.filter(t -> t.getLanguageCode().equals("en")).ifPresent(ExampleApi::log); +``` + +### `flatMap(Function> mapper)` + +The `flatMap` method applies the given function to the value if present, otherwise returns an empty `Optional`. + +```java +Optional translation = azureApi.translate(text).flatMap(response -> response.getFirstResult().getTranslations().stream().findFirst()); +translation.ifPresent(ExampleApi::log); +``` + +## Further Reading + +- [Optional (Java Platform SE 8 )](https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html) +- [Java 8 Optional Tutorial](https://www.baeldung.com/java-optional) +- [Java 8 Optional API](https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html) diff --git a/docs/src/examples/index.md b/docs/src/examples/index.md index e2f2a2bd..b8ee8a3c 100644 --- a/docs/src/examples/index.md +++ b/docs/src/examples/index.md @@ -1,12 +1,10 @@ --- page: true title: Examples -aside: false footer: false -outline: false --- -## Examples {#examples} +# Examples {#examples} This section contains examples of how to use AT4J in different scenarios. @@ -69,6 +67,9 @@ public class ExampleDetector { ## JSON Translator {#json} -> [!IMPORTANT] -> check [here](https://github.com/brenoepics/kt-json-i18n) +Azure Translator API does not support JSON translation. However, you can use AT4J to translate JSON objects. + +[kt-json-i18n](https://github.com/brenoepics/kt-json-i18n) is a library +that allows you to translate JSON objects using AT4J. +You can use it as an example to translate JSON objects. diff --git a/docs/src/guide/azure-subscription.md b/docs/src/guide/azure-subscription.md index 8cd0a3ad..aac0e81f 100644 --- a/docs/src/guide/azure-subscription.md +++ b/docs/src/guide/azure-subscription.md @@ -6,12 +6,15 @@ footer: false :::warning Azure Keys -Remember to **keep your keys secure and do not share them publicly**. If you believe that a key has been compromised, you must regenerate it in Azure's Panel. +Remember to **keep your keys secure and do not share them publicly**. +If you believe that a key has been compromised, +you must regenerate it in Azure's Panel. For more information, visit the [Azure portal](https://portal.azure.com/). - ::: +::: -Azure Text Translation is able to translate text instantly or in batches across [more than 100 languages](https://go.microsoft.com/fwlink/?linkid=2216841), +Azure Text Translation is able to translate text instantly or in batches +across [more than 100 languages](https://go.microsoft.com/fwlink/?linkid=2216841), Support a wide range of use cases, such as translation for call centers, multilingual conversational agents, or in-app communication. @@ -19,23 +22,27 @@ or in-app communication. ## Free Tier {#azure-free-tier} Azure offers a free tier for its services, which is a great way to get started with Azure Translator for Java. -The free tier includes a monthly allowance of two million characters for Translator Text. This is sufficient for testing and small projects. +The free tier includes a monthly allowance of two million characters for Translator Text. This is sufficient for testing +and small projects. -Please note that the free tier usage limits are subject to change by Azure, and it's recommended to check the current details on the [Azure Pricing](https://azure.microsoft.com/en-us/pricing/details/cognitive-services/translator/) page. +Please note that the free tier usage limits are subject to change by Azure, and it's recommended to check the current +details on the [Azure Pricing](https://azure.microsoft.com/en-us/pricing/details/cognitive-services/translator/) page. ## How to generate an Azure Translation Subscription {#generate-azure-subscription} -> [Generate Here](https://portal.azure.com/#view/Microsoft_Azure_ProjectOxford/CognitiveServicesHub/~/TextTranslation). +> [!TIP] +> Generate your +> keys [Here](https://portal.azure.com/#view/Microsoft_Azure_ProjectOxford/CognitiveServicesHub/~/TextTranslation). 1. Sign in to the [Azure portal](https://portal.azure.com/). 2. In the left-hand menu, click on "Create a resource." 3. In the "Search the Marketplace" box, type "Translator Text" and select it from the dropdown list. 4. Click on the "Create" button. 5. Fill in the required details: - * **Name:** Enter a unique name for your resource. - * **Subscription:** Select the Azure subscription that you want to use. - * **Resource Group:** You can create a new resource group or select an existing one. - * **Pricing tier:** Select the pricing tier that suits your needs. + - **Name:** Enter a unique name for your resource. + - **Subscription:** Select the Azure subscription that you want to use. + - **Resource Group:** You can create a new resource group or select an existing one. + - **Pricing tier:** Select the pricing tier that suits your needs. 6. Click on the "Review + create" button. 7. Review your settings and click on the "Create" button. 8. After the deployment is complete, go to the resource you just created. diff --git a/docs/src/guide/basic-usage.md b/docs/src/guide/basic-usage.md index f271dfd4..14b9b090 100644 --- a/docs/src/guide/basic-usage.md +++ b/docs/src/guide/basic-usage.md @@ -76,4 +76,4 @@ Here are some brief pointers to help you get started: ## Still Got Questions? {#still-got-questions} -Check out our [FAQ](/about/faq). +Check out our [GitHub Discussions](https://github.com/brenoepics/at4j/discussions) page for more information and to ask questions. diff --git a/docs/src/guide/installation.md b/docs/src/guide/installation.md index 7fb9a8ca..7362020a 100644 --- a/docs/src/guide/installation.md +++ b/docs/src/guide/installation.md @@ -25,3 +25,4 @@ implementation group: 'io.github.brenoepics', name: 'at4j', version: 'AT4J-VERSI libraryDependencies += "io.github.brenoepics" % "at4j" % "AT4J-VERSION" ``` ::: + diff --git a/docs/src/guide/introduction.md b/docs/src/guide/introduction.md index ff23ef07..9cc2c832 100644 --- a/docs/src/guide/introduction.md +++ b/docs/src/guide/introduction.md @@ -10,13 +10,16 @@ This documentation will help you to get started with your first Azure Translator ## What is the purpose of the AT4J library? {#purpose} -The AT4J library is a Java wrapper for the Azure Translator API. +The AT4J library is a Java wrapper for the Azure Translator API +Using Java classes for its API like CompletableFuture for async +requests +and Optional for return types which may be `null`. It provides a simple and easy-to-use interface to interact with the Azure Translator API, allowing you to translate text between languages. -## What is the Azure Translator? {#azure-translator-api} +## What is the Azure Translator? {#azure-translator} -The Azure Translator API, +The Azure Translator, provided by Microsoft, is a cloud-based machine translation service that is part of the Microsoft Azure cloud services. It offers a set of APIs that allow for text translation between languages and language detection of a given text, among other features. diff --git a/docs/src/index.md b/docs/src/index.md index a7f76f6d..adc9d96d 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -7,7 +7,7 @@ hero: icon: 💬 tagline: Empower Your Applications with Language Translations. image: - src: ./image.svg + src: ./at4j.svg alt: Translate actions: - theme: brand diff --git a/docs/src/public/at4j.svg b/docs/src/public/at4j.svg new file mode 100644 index 00000000..034f7b36 --- /dev/null +++ b/docs/src/public/at4j.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/docs/src/public/favicon.svg b/docs/src/public/favicon.svg new file mode 100644 index 00000000..40b78dea --- /dev/null +++ b/docs/src/public/favicon.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/pom.xml b/pom.xml index 464aa3b0..a1f7e9a2 100644 --- a/pom.xml +++ b/pom.xml @@ -93,7 +93,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.1 + 3.4.2 default-jar