You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/LOCALIZATION.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ Beginning in Web Chat 4.8, this project shifted from community-provided localiza
6
6
7
7
To add a new language, please update the following files:
8
8
9
-
- Update [`/packages/component/src/Localization/overrides.json`](https://github.com/microsoft/BotFramework-WebChat/blob/main/packages/component/src/Localization/overrides.json) and add the language according to [Unicode CLDR](https://st.unicode.org/cldr-apps/v#locales///).
9
+
- Update [`/packages/api/src/localization/overrides.json`](https://github.com/microsoft/BotFramework-WebChat/blob/main/packages/api/src/localization/overrides.json) and add the language according to [Unicode CLDR](https://st.unicode.org/cldr-apps/v#locales///).
10
10
-`GLOBALIZE_LANGUAGE` is the language code used for referencing Unicode CLDR
11
11
- To see the supported list of Unicode CLDR, look under `/packages/component/node_modules/cldr-data/main/`.
12
12
- (Optional) `TEXT_TO_SPEECH` is used to indicate the language code for speech.
@@ -18,14 +18,14 @@ To add a new language, please update the following files:
18
18
-`COGNITIVE_SERVICES_SPEECH_TO_TEXT` is used to indicate that the language is supported by Cognitive Services Speech-to-Text Service.
19
19
-`COGNITIVE_SERVICES_TEXT_TO_SPEECH` is used to indicate that the language is supported by Cognitive Services Text-to-Speech Service. If the service supports neural voices, set it to `"neural"`; otherwise, `true`
20
20
-[List of supported languages](https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/language-support)
21
-
- Update [`/packages/component/src/Utils/normalizeLanguage.js`](https://github.com/microsoft/BotFramework-WebChat/blob/main/packages/component/src/Utils/normalizeLanguage.js) and add a normalization logic for ISO language.
21
+
- Update [`/packages/api/src/utils/normalizeLanguage.ts`](https://github.com/microsoft/BotFramework-WebChat/blob/main/packages/api/src/utils/normalizeLanguage.ts) and add a normalization logic for ISO language.
22
22
- This is for cleaning up data provided by developers.
23
23
- For example, if the language starts with `ja`, it will be mapped to `ja-JP`.
24
-
- Add a test to [`normalizeLanguage.spec.js`](https://github.com/microsoft/BotFramework-WebChat/blob/main/packages/component/src/Localization/normalizeLanguage.spec.js)
25
-
- Add a new language to [`/packages/component/src/Localization/`](https://github.com/microsoft/BotFramework-WebChat/tree/main/packages/component/src/Localization).
24
+
- Add a test to [`normalizeLanguage.spec.js`](https://github.com/microsoft/BotFramework-WebChat/blob/main/packages/api/src/utils/normalizeLanguage.spec.js)
25
+
- Add a new language to [`/packages/api/src/localization/`](https://github.com/microsoft/BotFramework-WebChat/tree/main/packages/api/src/localization/).
26
26
- Copy `en-US.json` as the base template.
27
-
- Add to [`getAllLocalizedStrings.js`](https://github.com/microsoft/BotFramework-WebChat/blob/main/packages/component/src/Localization/getAllLocalizedStrings.js)
28
-
- Add a test to [`getAllLocalizedStrings.spec.js`](https://github.com/microsoft/BotFramework-WebChat/blob/main/packages/component/src/Localization/getAllLocalizedStrings.spec.js)
27
+
- Add to [`getAllLocalizedStrings.js`](https://github.com/microsoft/BotFramework-WebChat/blob/main/packages/api/src/localization/getAllLocalizedStrings.ts)
28
+
- Add a test to [`getAllLocalizedStrings.spec.js`](https://github.com/microsoft/BotFramework-WebChat/blob/main/packages/api/src/localization/getAllLocalizedStrings.spec.js)
29
29
30
30
### Designing new strings
31
31
@@ -52,7 +52,7 @@ For strings that are contributed by the community, please submit a pull request
52
52
53
53
## Adding new strings for new UI
54
54
55
-
To add new strings to be used in the UI, please update [`/packages/component/src/localization/en-US.json`](https://github.com/microsoft/BotFramework-WebChat/blob/main/packages/component/src/localization/en-US.json). The localization team will pick up the new strings and translate them to all other officially supported languages.
55
+
To add new strings to be used in the UI, please update [`/packages/api/src/localization/en-US.json`](https://github.com/microsoft/BotFramework-WebChat/blob/main/packages/api/src/localization/en-US.json). The localization team will pick up the new strings and translate them to all other officially supported languages.
0 commit comments