UI Kit Localization?

Does the UI Web Kit support localizations ? For example if the target audience is Spanish is it possible to show the texts in Spanish inside the UI Kit components ? if yes, how? can you point me to the documentation ? Thank you.

Hello, @lorandd Let me pass this to our team and will stay in touch with you for updates.

Hello, @lorandd

To add language support to the Amity Social Cloud UIKit Web Open Source, please follow the steps below:

  1. Add Language Files: Place your language files (e.g., th.json) in the /Amity-Social-Cloud-UIKit-Web-OpenSource/src/i18n folder.Example:

jsonCopy code

// th.json
  "key": "value",
  1. Update Language Index: In /Amity-Social-Cloud-UIKit-Web-OpenSource/src/i18n/index.js, import and export the new language file.Example:

jsCopy code

// index.js
import en from './en.json';
import th from './th.json';
export default { en, th };
  1. Modify UiKitProvider: In /Amity-Social-Cloud-UIKit-Web-OpenSource/src/core/providers/UiKitProvider/index.js:
  • Change <Localisation locale="en"> to <Localisation locale={locale}>.
  • Add locale to the UiKitProvider prop.
  • Add locale: PropTypes.string to UiKitProvider.propTypes.
  1. Rebuild the Project: Run npm run build to generate the updated build.
  2. Integrate in App: In your app, add locale="th" to the AmityUiKitProvider component.Example:

jsxCopy code

    {/* Your app content */}

These steps should enable language support in your Amity Social Cloud UIKit Web Open Source project. If you encounter any issues or have further questions, feel free to reach out.

Best Regards
Support team