An object displaying localized text in search results related to your app.


@interface CSLocalizedString : NSString


The CSLocalizedString class helps you localize text in searchable items. You can use a CSLocalizedString object in place of an NSString object to display localized text in search results related to your app.

For example, you might use the following code to define a CSLocalizedString object for a searchable item you want to identify as “Song” in English:

CSSearchableItem *item = [CSSearchableItem new];
    item.uniqueIdentifier = @"song";
    CSSearchableItemAttributeSet *attributes = [[CSSearchableItemAttributeSet alloc] initWithItemContentType:(NSString *)kUTTypeItem];
    item.attributeSet = attributes;
    CSLocalizedString *displayName = [[CSLocalizedString alloc] initWithLocalizedStrings:@{@"en":@"Song", @"fr":@"Chanson"}];
    attributes.displayName = displayName.localizedString;


Specifying Localized Strings

- initWithLocalizedStrings:

Initializes a CSLocalizedString object with the specified dictionary of localized strings.

Getting a Localized String

- localizedString

Returns the localized string for the current language.


Inherits From

See Also



The criteria to apply when searching previously indexed app content.


An object representing a person in the context of search results.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software