Implementation Considerations – Internationalization
How can I support or display multiple languages?
We currently only support Latin-based languages, however other scripts (such as Cyrillic, Hebrew, Arabic) may still work.
Either case, read below for things to look out for.
For PDF
Fonts
If using the default “Helvetica” font
As noted in the PDF Template Design Guideline, if no custom font is specified the generated PDF will use the default “Helvetica” font. This Helvetica font uses Windows-1252 encoding character sets which only supports 218 characters in the Latin alphabet.
Full character set:
Supported languages:
English, Irish, Italian, Norwegian, Portuguese, Spanish, Swedish, German, Finnish, Icelandic, French, Faroese, Luxembourgish, Albanian, Estonian, Swahili, Tswana, Catalan, Basque, Occitan, Romansh, Dutch (except the IJ/ij character), and Slovene (except the č character)
If your payload contains characters outside of this character set, you must use a custom font that has character support for your languages.
If using a custom font
Our platform currently only allows for a 1MB maximum template zip file. This means CJK (Chinese, Japanese and Korean) fonts would generally be too big.
If this is you, please contact us.
Templating
You may wish to make your PDF bilingual / trilingual / multi-lingual, however unlike apps or websites, PDFs cannot display different languages depending on the user’s system language preferences.
Option 1: Display all the languages on a single template
Real world example of this is a passport. The labels have multiple languages on it, and often so does disclaimer and informational text. This approach may be useful if your use case requires cross-regional holder and verifiers, and the verifier may not be familiar with the credential itself.
Option 2: Different template files for different languages
If you are already gathering the user’s preferred language, you may wish to create multiple templates and switch template file as needed. This is useful if the credential would generally be used within one region or be presented remotely.
For Apple Pass
Generally if the language you want to use is available as a system language on iOS or there are no issues displaying characters from your language in iOS then you should not run into any issues.
Apple Pass offers multi-language passes. This means a single pkpass
file can include multiple languages (such as English, French, Japanese…) all at once. The language that gets displayed to the end user will default to the user’s device system language. To learn more about this see Apple’s Developer Documentation.
For Google Pass
Generally if the language you want to use is available as a system language on Android or there are no issues displaying characters from your language in Android then you should not run into any issues.
Like Apple Pass, Google Pass offers multi-language passes. You would need to use the LocalizedString
API type, see Google Wallet API reference.