Skip to main content
The MetaMap iOS SDK supports multiple languages to provide a localized verification experience for users worldwide. You can set a fixed language or allow the SDK to use the device’s default language.

Supported Languages

The SDK supports the following language codes:

Setting a Fixed Language

Use the fixedLanguage metadata parameter to set a specific language for the SDK:

Swift

Objective-C

Device Language Detection

By default (when fixedLanguage is not specified), the SDK automatically detects and uses the device’s language setting if it’s supported. If the device language is not supported, the SDK falls back to English.

Language Selection Examples

Example 1: User-Selected Language

Example 2: Region-Based Language

Example 3: Multi-Language Support with Picker

Storing Language Preferences

Combined with Other Metadata

You can combine fixedLanguage with other metadata parameters:

Localization Best Practices

  1. User Choice: Allow users to select their preferred language in your app settings
  2. Persistence: Store language preferences using UserDefaults or a similar mechanism
  3. Regional Defaults: Consider using device locale to suggest an appropriate language
  4. Fallback: Always have English as a fallback for unsupported languages
  5. Testing: Test your app with different language settings to ensure proper localization
  6. Consistency: Use the same language code throughout your app and MetaMap integration

Language Code Validation

The SDK will automatically fall back to English if an unsupported language code is provided or if the device language is not in the supported list.

Handling RTL Languages

While the current SDK supports Turkish, which uses LTR (left-to-right) text direction, if you’re building an app that supports RTL languages, ensure your app’s layout adapts accordingly. The MetaMap SDK will handle text direction automatically based on the selected language.