Enable localization (iOS)

Enable, customize, and improve player accessibility for your iOS app.


The iOS SDK selects the appropriate string from one of the available string tables. The SDK searches the string tables in the following order:

  • Main bundle string tables in the app
  • String tables in the JWPlayerKit (iOS SDK)
  • English string tables in the iOS SDK

By creating a string table for a language, you can customize the displayed string for menus, title bars, and strings in many other interfaces. Your language-specific string table will override the string tables in the iOS SDK.

You can create string tables for any language, allowing you to customize the video experience for your global users.

📘

There are a handful of classes created by our builders which take a string as an argument. These values are not localized by the SDK. Instead, you should provide a localized string to these structures, or override their default in your string tables using our string keys.

For example, in JWAdInterfaceStyleBuilder there are string properties for skipText, countdownText, and skipDelayText. These strings will be displayed as provided. Thus, if you set one to “Skip Ahead” the text displayed is “Skip Ahead” and is not looked up from the string table.



Requirements

  • JWPlayerKit 4.3.0+ (iOS)


Default Supported Languages

The iOS SDK supports localization for the languages in the following table.

Arabic (ar) Chinese (zh) Danish (da) Dutch (nl)
English (en) Finnish (fi) French (fr) German (de)
Greek (el) Hebrew (he) Indonesian (id) Italian (it)
Japanese (ja) Korean (ko) Norwegian Bokmal (no) Occitan (oc)
Polish (pl) Portuguese (pt) Romanian (ro) Russian (ru)
Spanish (es) Swedish (sv) Thai (th) Turkish (tr)
Vietnamese (vi)


Enable localization

General

Use the following steps to enable localization:

  1. Create language-specific string tables for the app. Refer to the String Reference to see the list of customizable strings in the player.

  2. In the info.plist of the app, add the CGBundleAllowMixedLocalizations key and set the value to YES. When added to info.plist, the key appears as Localized resources can be mixed.

    <key>CGBundleAllowMixedLocalizations</key>
    <string>YES</string>
    1530

    Localized resources can be mixed setting in the info.plist file


Google IMA

By default, Google IMA uses the language specified in the user’s default settings.

Use the following steps to override the default settings:

  1. Use JWImaSettingsBuilder() to create a JWImaSettings object.
  2. Define locale with the two-letter language code.

let imaSettings = try! JWImaSettingsBuilder()
       .locale("en") // Set to English
       .build()
// adConfigBuilder is a JWImaAdvertisingConfigBuilder
adConfigBuilder.imaSettings(imaSettings)
JWImaSettings *imaSettings = [[[[JWImaSettingsBuilder alloc] init] locale:@"en"] build];

// adConfigBuilder is a JWImaAdvertisingConfigBuilder
[adConfigBuilder imaSettings:imaSettings];


String Reference

General Strings

The following table lists all strings that can be customized for a language-specific string table. The default English string is listed for each string.

StringDescription
jwplayer_ad_countdown

Prefix for the ad countdown



English: Ad in


NOTE: The number of seconds until the ad begins is appended on the end of the string.

jwplayer_advertisement

Displayed in the control center when an advertisement is playing while the application is backgrounded



English: Advertisement

jwplayer_advertising_ad_x_of_y

Displays on the ad pod count label during VAST ad



English: Ad AD_POD_CURRENT of AD_POD_LENGTH


NOTE: The substring AD_POD_CURRENT is replaced by the index of the currently playing advertisement. The substring AD_POD_LENGTH is replaced by the total number of advertisements in the ad pod.

jwplayer_advertising_remaining_time

Countdown text that displays during ad playback



English: This ad will end in xx

NOTE: The letters, xx, are replaced with a number of seconds.

jwplayer_advertising_skip_messageSkip countdown message during VAST ad playback


English: Skip ad in xx

NOTE: The letters, xx, are replaced with a number of seconds.
jwplayer_advertising_skip_textButton text that appears when an ad is skippable


English: Skip
jwplayer_airplayAccessibility label for Airplay button


English: AirPlay
jwplayer_amSuffix on a time in the day before noon.


English: AM
jwplayer_audioMenu header for language settings


English: Audio
jwplayer_audio_and_subtitlesMenu header for subtitles and audio in the same menu


English: Audio & Subtitles
jwplayer_audio_tracksHeader above a selection of audio tracks in the Audio & Subtitles menu


English: Audio Tracks
jwplayer_autoLabel text for the default quality selection option that allows the player to automatically select the appropriate quality level for the viewer


English: Auto
jwplayer_backText displayed and used for a back button in a menu


English: Back
jwplayer_cancelMenu option for cancelling out of a menu


English: Cancel
jwplayer_cast_connect_to_a_deviceMenu header for casting menu displaying devices


English: Connect to a device
jwplayer_cast_disconnectMenu option to disconnect from a casting or linked device


English: Disconnect
jwplayer_cast_playing_onTitle on the casting information button while it is casting


English: Playing on device

NOTE:deviceis replaced with the device name.
jwplayer_cast_scanningInformational text when scanning for casting devices


English: Scanning for devices...
jwplayer_cast_use_same_wifiMenu subtext for casting, informing the user to be on the same WiFi network as the device they are searching for and wish to connect to


English: Make sure your device is connected to the same WiFi network.
jwplayer_casting_info_button_titleTitle displayed on the blue button when casting


English: Casting Info
jwplayer_chapterSingular word: chapter


English: Chapter
jwplayer_chaptersPlural word: chapters


English: Chapters
jwplayer_chromecastAccessibility label for ChromeCast button


English: Chromecast
jwplayer_closeText on a close button used to close a menu or overlay


English: Close
jwplayer_close_menuAccessibility label for closing the menu


English: close menu
jwplayer_doneButton on menus labeled: done


English: Done
jwplayer_errors_bad_connectionError message text displayed when a connection issue prevents playback


English: This video cannot be played because of a problem with your internet connection.
jwplayer_errors_cant_load_playerError message text displayed when a player fails to set up for a non-network reason, like incorrect JSON or license keys


English: Sorry, the video player failed to load.
jwplayer_errors_cant_play_videoError message text displayed when a media item fails to load and the reason is because of the media file itself


English: This video file cannot be played.
jwplayer_errors_error_codeLabel text for a numeric error code, for example, Error code: 50244402


English: Error Code
jwplayer_errors_live_stream_downError message text displayed when a live stream down or has ended


English: The live stream is either down or has ended.
jwplayer_errors_protected_contentError message text displayed when DRM or protected content fails


English: There was a problem providing access to protected content.
jwplayer_errors_technical_errorGeneric error message text for all cases that do not fit in another situation


English: This video cannot be played because of a technical error.
jwplayer_exit_fullscreenText in the control bar to exit fullscreen


English: Exit Fullscreen
jwplayer_forward_15_secondsAccessibility label for fast forwarding


English: fast forward 15 seconds
jwplayer_from_beginningDisplayed in the information panel, on the restart button


English: From beginning
jwplayer_fullscreenAccessibility label for the full screen button


English: Fullscreen
jwplayer_go_to_liveText for the “go to live” button


English: Go to live
jwplayer_hourSingular word: hour


English: hour
jwplayer_hoursPlural word: hours


English: hours
jwplayer_hours_abbrAbbreviation for hours


English: hrs
jwplayer_just_watchedLabel displayed over playlist items in the playlist item menu, conveying that an item has already been watched


English: Just watched
jwplayer_learn_moreTap-through button on the VAST ad UI


English: Learn more
jwplayer_live_broadcastLabel text for live streams, displayed in the control bar


English: Live
jwplayer_menuAccessibility label for opening the settings menu


English: menu
jwplayer_minuteSingular word: minute


English: minute
jwplayer_minutesPlural word: minutes


English: minutes
jwplayer_minutes_abbrAbbreviation for the word minutes


English: mins
jwplayer_more_videosButton text and overlay heading for recommended video interfaces


English: More Videos
jwplayer_nextAccessibility label for the right arrow in paginated overlays


English: Next
jwplayer_next_upTitle of an overlay that displays the next item to automatically play


English: Next Up
jwplayer_next_up_countdownCountdown message text until the next item automatically plays


English: Next up in xx


NOTE: The letters, xx, will be programmatically replaced by a number of seconds.
jwplayer_normalWord for 1x playback speed


English: Normal
jwplayer_not_specifiedMenu option for video quality is not being specified by the user


English: Not specified
jwplayer_offMenu option text for turning an option off, such as closed captions


English: Off
jwplayer_okayDisplayed on a button for the affirmative


English: Okay
jwplayer_pauseAccessibility label for the pause button


English: Pause
jwplayer_picture_in_pictureAccessibility label for picture in picture button


English: Picture in Picture
jwplayer_playAccessibility label for the play button


English: Play
jwplayer_playback_ratesHeader text for the playback rate controls menu


English: Playback Rates
jwplayer_playerAccessibility label for the player


English: Video Player
jwplayer_playlistPlaylist menu header


English: Playlist
jwplayer_pmSuffix on a time in the day after noon


English: PM
jwplayer_previousAccessibility label for the previous playlist item button


English: Previous
jwplayer_qualityHeader text for the video quality controls menu


English: Quality
jwplayer_recommendationsRecommendations menu header


English: Recommendations
jwplayer_replayAccessibility label for the replay button


English: Replay
jwplayer_resumeText for a button used to resume playback


English: Resume
jwplayer_secondSingular word: second


English: second
jwplayer_secondsPlural word: seconds


English: seconds
jwplayer_seconds_abbrAbbreviation for seconds


English: secs
jwplayer_subtitlesMenu header for subtitles menu


English: Subtitles
jwplayer_unavailableSingle-word text for describing when a menu or option is unavailable


English: Unavailable
jwplayer_unknown_ccLabel displayed for closed captions with an unknown region


English: Unknown cc

Accessibility

The following table lists all the customizable accessibility labels and values. The default English string is listed for each string.

📘

Refer to Apple's documentation for further information on these properties and how they affect the user experience.

StringDescription
jwplayer_acc_airplaybutton

Label for the AirPlay button



English: AirPlay

jwplayer_acc_audioandcaptionsbutton

Label for the header of the Audio & Captions button



English: Audio and captions

jwplayer_acc_chaptersbutton

Label for the chapters button



English: Chapters

jwplayer_acc_chromecastbutton

Label for the Chromecast button



English: Chromecast

jwplayer_acc_closebutton

Label for menu close buttons



English: Close

jwplayer_acc_description

Label for the description label



English: The description is xx


NOTE: The substring xx in the label will be replaced with the text description of the video specified in the config.

jwplayer_acc_durationlabel

Label of the label specifying the duration of the video



English: Duration


NOTE: This label will also have an accessibility value set to a text description of the total duration of the video.

jwplayer_acc_enterfullscreenbutton

Label of the button used to switch the video into a full screen experience



English: Enter full screen

jwplayer_acc_exitfullscreenbutton

Label of the button used to switch the video out of a full screen experience



English: Exit full screen

jwplayer_acc_fastforwardbutton

Label of the button used to skip the next 15 seconds of the video



English: Fast-forward 15 seconds

jwplayer_acc_learnmorebutton

Label of the button used to visit the click-through URL of the currently-playing VAST ad



English: Tap to learn more

jwplayer_acc_livebutton

Label of the live button displayed during live content



English: Live

jwplayer_acc_nextitembutton

Label of the button used to skip to the next item in the playlist



English: Next item

jwplayer_acc_nextup

Label of the label displayed about the next item in the playlist



English: The next video is xx


NOTE: The substring xx is replaced by the title of the next item.

jwplayer_acc_next_up_countdown

Label of the label displaying the countdown to the next item in the playlist loading and starting



This is on the next up card.



English: Next up in xx seconds.


NOTE: The substring xx is replaced by the number of seconds until the next item plays.

jwplayer_acc_pausebutton

Label of the pause button



English: Pause

jwplayer_acc_playbackratebutton

Label of the playback rate button



English: Playback rates

jwplayer_acc_playbutton

Label of the play button



English: Play

jwplayer_acc_playlistbutton

Label of the playlist button



English: Playlist

jwplayer_acc_playlistitem_title

Label of the playlist item in the playlist menu



English: Item is titled xx


NOTE: The substring xx is replaced by the title of the item.

jwplayer_acc_playlistitem_title_duration

Label of the playlist item in the playlist menu if it is accompanied by a duration



English: Item is titled xx and is yy long.


NOTE: The substring xx is replaced by the title of the item. The substring yy is replaced by the duration of the video.

jwplayer_acc_positionlabel

Label of the label specifying the position of the video



English: Position


NOTE: This label will also have an accessibility value set to a text description of the position within the video.

jwplayer_acc_previousitembutton

Label of the button used to skip to the previous item in the playlist



English: Previous item

jwplayer_acc_resumebutton

Label of the resume button



English: Resume playback

jwplayer_acc_rewindbutton

Label of the button used to rewind the video 15 seconds before its current position



English: Rewind 15 seconds

jwplayer_acc_settingsbutton

Label of the setting button



English: Settings

jwplayer_acc_skipbutton_active

Label of the skip button displayed during an advertisement using VAST when the button is active



English: Skip ad

jwplayer_acc_skipbutton_inactive

Label of the skip button displayed during an advertisement using VAST when the button is inactive waiting to be enabled



English: Skip ad in xx seconds


NOTE: The substring xx will be replaced by the number of seconds until the button is enabled.

jwplayer_acc_title

Label of the title label of the current content



English: The title is xx


NOTE: The substring of xx is replaced by the title of the content.

jwplayer_acc_value_disabled

Value of menu buttons which have been disabled



English: disabled

jwplayer_acc_value_selected

Value of menu buttons or options which have been selected and are displayed as selected



English: selected

jwplayer_acc_value_unknown

Value of menu options with an indeterminate value, such as an unknown locale for captions



English: unknown



Did this page help you?
© 2007- Longtail Ad Solutions, Inc.