How to change your language settings for ASAP iOS SDK?

How to change your language settings for ASAP iOS SDK?

The ASAP SDK supports 47 languages. You can set any language of your choice based on the geographical location of your app's end-users.

Below are the 47 language codes that help you set the language for the ASAP help widget.

Language

Local Code

English (UK)

en-GB

English (US)

en

German

de

Spanish

es

Catalan

ca-ES

French

fr

French (Canada)

fr-CA

Italian

it

Russian

ru

Chinese (Traditional)

zh-Hant

Chinese (Simplified)

zh-Hans

Turkish

tr

Dutch

nl

Danish

da

Portuguese (Portugal)

pt-PT

Japanese

ja

Swedish

sv

Polish

pl

Arabic

ar

Hebrew

he

Afrikaans

af

Czech

cz

Bulgarian

bg

Finnish

fi

Greek

el

Hungarian

hu

Indonesian

id

Norwegian (Bokmal)

nb

Romanian

ro

Thai

th

Ukrainian

uk

Vietnamese

vi

Urdu

ur

Hindi

hi

Telugu

te

Kannada

kn

Tamil

ta

Marathi

mr

Korean

ko

Persian

fa

Bengali

bn

Gujarati

gu

Malay

ms

Malayalam

ml

Slovak

sk

Croatian

hr

Slovenian

sl


Below is the code that helps you set the language for the ASAP help widget. Pass the language identifier to the method. For instance, pass "en" for English.

Swift

  1. ZDPortalConfiguration.setSDKLanguage(<#String#>)

Objective-C

  1. [ZDPortalConfiguration setSDKLanguage:<#NSString#>];
Notes
However, to limit the size of the SDK, we have bundled only the 13 languages supported in previous SDK versions.

The table below lists the 13 languages that are bundled with the SDK:

Language

Local Code

English

en

German

de

Spanish

es

French

fr

Italian

it

Russian

ru

Chinese (Traditional)   

zh-Hant

Chinese (Simplified)

zh-Hans

Turkish

tr

Dutch

nl

Danish

da

Portuguese (Portugal)  

pt-PT

Japanese

ja


To add any of the other 34 languages to your app, perform the following steps:

    1.    Download the strings bundle.
    2.    Remove the lproj files of the languages not required for your app.
    3.    Finally, add the bundle to your project.

How to customize UI strings? 

The ASAP SDK facilitates customization of the text that appears on the different screens of the help widget. The text includes UI labels for help modules, error messages, and general information.

To change the text, perform the following steps:

    1.    Create a bundle titled ASAPStrings.bundle in your app's Xcode project. The path to access this bundle is Applicationbundle/ASAPStrings.bundle.
    2.    Create a new lproj file with the language code as the filename and customize the keys' values as required. You can customize the prominent keys listed below or all in the language bundle.
    3.    Add this new lproj file to the ASAPStrings bundle.
Notes
Each language needs a unique lproj file. To customize the strings in each language you want to support in your add-on, repeat steps 2 and 3 as often as required.

The following table lists some prominent keys in the default ASAPLocalizable.strings file.

Key

Default Text

Description

DeskPortal.Dashboard.Heading

"Welcome"

Text that appears on the help center dashboard

DeskPortal.Dashboard.helpcenter.title

"Knowledge Base"

Title of the Knowledge Base module icon on the dashboard

DeskPortal.Dashboard.helpcenter.description

"Browse our extensive repository of help articles"

Text that describes the Knowledge Base

DeskPortal.Dashboard.community.title

"Community"

Title of the user community module icon on the dashboard

DeskPortal.Dashboard.community.description

"Find and share solutions with the User Community"

Text that describes the User Community

DeskPortal.Dashboard.addticket.title

"Submit Ticket"

Title of the ticket submission module icon on the dashboard

DeskPortal.Dashboard.addticket.description

"Seek help from our agents"

Text that describes the ticket submission screen

DeskPortal.Dashboard.myticket.title

"My Tickets"

Title of the my tickets icon on the dashboard

DeskPortal.Dashboard.myticket.description

"View and manage tickets that you submitted"

Text that describes the my tickets screens

DeskPortal.Helpcenter.article.detail.relatedtitle

"Related Articles"

Text that appears below any help article in the Knowledge Base

DeskPortal.Helpcenter.article.detail.vote.description

"Was this article helpful?"

Text that seeks feedback from the user

DeskPortal.Helpcenter.feedback.title

"Feedback"

Title of the feedback form

DeskPortal.Helpcenter.feedback.description

"We're sorry the article wasn't helpful."

Text that appears when a user downvotes an article

DeskPortal.Myticket.option.closeticket

"Close Ticket"

Text for option that lets the user close a ticket they submitted

DeskPortal.Error.message.reload

"Retry"

Error message that appears if ticket submission fails

DeskPortal.Network.failed.error.message

"Check your internet connection"

Error message that indicates loss of connectivity

DeskPortal.Dashboard.livechat.title

"Live Chat"

Title of the live chat module on the help center dashboard

DeskPortal.Helpcenter.category.subheading

"Section"

Text that appears if only one article category exists in the Knowledge Base

DeskPortal.Helpcenter.categories.subheading

"Sections"

Text that appears if multiple article categories exist in the Knowledge Base

DeskPortal.Helpcenter.article.detail.title

"FAQs"

Title of the individual article screen

DeskPortal.Addticket.title

"Add Ticket"

Title of the ticket submission form

DeskPortal.Myticket.comment.option.title

"Comment Actions"

Title of the options menu that appears when a user adds a comment to a ticket

DeskPortal.Myticket.option.editcomment

"Edit Comment"

Text for option that lets the user edit a comment they made

DeskPortal.Helpcenter.article.subheading

"Article"

Text that appears if only one article exists under an article category

DeskPortal.Helpcenter.articles.subheading

"Articles"

Text that appears if multiple articles exist under an article category