UIKit React Native v3
UIKit React Native
UIKit
React Native
Home
/
UIKit
/
React Native

String resource

The StringSet interface contains all strings that appear on UIKit modules. The following table shows the elements of StringSet.

CategoryKeyString

Group channel list

GROUP_CHANNEL_LIST.HEADER_TITLE

Channels

Group channel list

GROUP_CHANNEL_LIST.DIALOG_CHANNEL_NOTIFICATION

Turn on notifications
Turn off notifications

Group channel list

GROUP_CHANNEL_LIST.DIALOG_CHANNEL_LEAVE

Leave channel

Group channel

GROUP_CHANNEL.LIST_BANNER_FROZEN

Channel is frozen

Group channel

GROUP_CHANNEL.LIST_BUTTON_NEW_MSG

${number} new messages

Group channel

GROUP_CHANNEL.MESSAGE_BUBBLE_EDITED_POSTFIX

(edited)

Group channel

GROUP_CHANNEL.MESSAGE_BUBBLE_UNKNOWN_TITLE

(Unknown message type)

Group channel

GROUP_CHANNEL.MESSAGE_BUBBLE_UNKNOWN_DESC

Cannot read this message.

Group channel

GROUP_CHANNEL.INPUT_PLACEHOLDER_ACTIVE

Enter message

Group channel

GROUP_CHANNEL.INPUT_PLACEHOLDER_DISABLED

Chat is unavailable in this channel

Group channel

GROUP_CHANNEL.INPUT_EDIT_OK

Save

Group channel

GROUP_CHANNEL.INPUT_EDIT_CANCEL

Cancel

Group channel

GROUP_CHANNEL.DIALOG_MESSAGE_COPY

Copy

Group channel

GROUP_CHANNEL.DIALOG_MESSAGE_EDIT

Edit

Group channel

GROUP_CHANNEL.DIALOG_MESSAGE_SAVE

Save

Group channel

GROUP_CHANNEL.DIALOG_MESSAGE_DELETE

Delete

Group channel

GROUP_CHANNEL.DIALOG_MESSAGE_DELETE_CONFIRM_TITLE

Delete this message?

Group channel

GROUP_CHANNEL.DIALOG_MESSAGE_DELETE_CONFIRM_OK

Delete

Group channel

GROUP_CHANNEL.DIALOG_MESSAGE_DELETE_CONFIRM_CANCEL

Cancel

Group channel

GROUP_CHANNEL.DIALOG_MESSAGE_FAILED_RETRY

Retry

Group channel

GROUP_CHANNEL.DIALOG_MESSAGE_FAILED_REMOVE

Remove

Group channel

GROUP_CHANNEL.DIALOG_ATTACHMENT_CAMERA

Camera

Group channel

GROUP_CHANNEL.DIALOG_ATTACHMENT_PHOTO_LIBRARY

Photo library

Group channel

GROUP_CHANNEL.DIALOG_ATTACHMENT_FILES

Files

Group channel settings

GROUP_CHANNEL_SETTINGS.HEADER_TITLE

Channel information

Group channel settings

GROUP_CHANNEL_SETTINGS.HEADER_RIGHT

Edit

Group channel settings

GROUP_CHANNEL_SETTINGS.MENU_NOTIFICATION

Notifications

Group channel settings

GROUP_CHANNEL_SETTINGS.MENU_MEMBERS

Members

Group channel settings

GROUP_CHANNEL_SETTINGS.MENU_LEAVE_CHANNEL

Leave channel

Group channel settings

GROUP_CHANNEL_SETTINGS.DIALOG_CHANGE_NAME

Change channel name

Group channel settings

GROUP_CHANNEL_SETTINGS.DIALOG_CHANGE_NAME_PROMPT_TITLE

Change channel name

Group channel settings

GROUP_CHANNEL_SETTINGS.DIALOG_CHANGE_NAME_PROMPT_PLACEHOLDER

Enter name

Group channel settings

GROUP_CHANNEL_SETTINGS.DIALOG_CHANGE_NAME_PROMPT_OK

Save

Group channel settings

GROUP_CHANNEL_SETTINGS.DIALOG_CHANGE_NAME_PROMPT_CANCEL

Cancel

Group channel settings

GROUP_CHANNEL_SETTINGS.DIALOG_CHANGE_IMAGE

Change channel image

Group channel settings

GROUP_CHANNEL_SETTINGS.DIALOG_CHANGE_IMAGE_MENU_TITLE

Change channel image

Group channel settings

GROUP_CHANNEL_SETTINGS.DIALOG_CHANGE_IMAGE_MENU_CAMERA

Take photo

Group channel settings

GROUP_CHANNEL_SETTINGS.DIALOG_CHANGE_IMAGE_MENU_PHOTO_LIBRARY

Choose photo

Group channel members

GROUP_CHANNEL_MEMBERS.HEADER_TITLE

Members

Group channel members

GROUP_CHANNEL_MEMBERS.USER_BAR_ME_POSTFIX

(You)

Group channel members

GROUP_CHANNEL_MEMBERS.USER_BAR_OPERATOR

Operator

Group channel create

GROUP_CHANNEL_CREATE.HEADER_TITLE

New channel

Group channel create

GROUP_CHANNEL_CREATE.HEADER_RIGHT

Create
Create (${number})

Group channel invite

GROUP_CHANNEL_INVITE.HEADER_TITLE

Invite users

Group channel invite

GROUP_CHANNEL_INVITE.HEADER_RIGHT

Invite
Invite (${number})

Labels

LABELS.USER_NO_NAME

(No name)

Labels

LABELS.TYPING_INDICATOR_TYPINGS

${string} is typing...
${string} and ${string} are typing...
Several people are typing...

Placeholder

PLACEHOLDER.NO_BANNED_MEMBERS

No banned members

Placeholder

PLACEHOLDER.NO_CHANNELS

No channels

Placeholder

PLACEHOLDER.NO_MESSAGES

No messages

Placeholder

PLACEHOLDER.NO_MUTED_MEMBERS

No muted members

Placeholder

PLACEHOLDER.NO_RESULTS_FOUND

No results founds

Placeholder

PLACEHOLDER.ERROR.MESSAGE

Something went wrong

Placeholder

PLACEHOLDER.ERROR.RETRY_LABEL

Retry

Dialog

DIALOG.ALERT_DEFAULT_OK

Ok

Dialog

DIALOG.PROMPT_DEFAULT_OK

Submit

Dialog

DIALOG.PROMPT_DEFAULT_CANCEL

Cancel

Dialog

DIALOG.PROMPT_DEFAULT_PLACEHOLDER

Enter

Toast

TOAST.COPY_OK

Copied

Toast

TOAST.DOWNLOAD_START

Downloading...

Toast

TOAST.DOWNLOAD_OK

File saved

Toast

TOAST.DOWNLOAD_ERROR

Couldn't download file.

Toast

TOAST.OPEN_CAMERA_ERROR

Couldn't open camera.

Toast

TOAST.OPEN_FILES_ERROR

Couldn't open files.

Toast

TOAST.OPEN_PHOTO_LIBRARY_ERROR

Couldn't open photo library.

Toast

TOAST.DELETE_MSG_ERROR

Couldn't delete message.

Toast

TOAST.RESEND_MSG_ERROR

Couldn't send message.

Toast

TOAST.SEND_MSG_ERROR

Couldn't send message.

Toast

TOAST.UPDATE_MSG_ERROR

Couldn't edit message.

Toast

TOAST.TURN_ON_NOTIFICATIONS_ERROR

Couldn't turn on notifications.

Toast

TOAST.TURN_OFF_NOTIFICATIONS_ERROR

Couldn't turn off notifications.

Toast

TOAST.LEAVE_CHANEL_ERROR

Couldn't leave channel.


Customize the StringSet

You can customize each string in the StringSet by creating a new custom StringSet with the createBaseStringSet method. For strings used in dates, you can pass the locale object of the date-fns library and the text as a parameter to each dateLocale and overrides prop in UIKit. The default language for all texts are English.

import { StringSetEn, createBaseStringSet, SendbirdUIKitContainer } from '@sendbird/uikit-react-native';
import dateLocale from 'date-fns/locale/ko';

const StringSetKo = createBaseStringSet({
    dateLocale,
    overrides: {
        LABELS: {
            USER_NO_NAME: '(이름없음)',
            TYPING_INDICATOR_TYPINGS: (users) => {
                if (users.length === 0) return '';
                return `${users.length}명이 입력중...`;
            },
        },
        // ...
    },
});

const StringSets = {
    'en': StringSetEn,
    'ko': StringSetKo,
};
const App = () => {
    const { locale, setLocale } = useYourLocale();
    return (
        <SendbirdUIKitContainer
            // ...
            localization={{
                stringSet: StringSets[locale],
            }}
        >
            <Navigations />
        </SendbirdUIKitContainer>
    );
};

const SwitchLanguageButton = () => {
    const { locale, setLocale } = useYourLocale();
    const { STRINGS } = useLocalization();
    const nextLocale = locale === 'en' ? 'ko' : 'en';

    return (
        <View>
            <Button onPress={() => setLocale(nextLocale)}>{`Change to ${nextLocale}`}</Button>
            <Text>{STRINGS.LABELS.USER_NO_NAME}</Text>
        </View>
    );
};