Localization

PSPDFKit for Windows comes with many built-in languages:

  • Chinese Simplified / Chinese Traditional (zh-Hans/zh-Hant)
  • Croatian (hr)
  • Czech (cs)
  • Danish (da)
  • Dutch (nl)
  • English (en)
  • English United Kingdom (en-GB)
  • Finnish (fi)
  • French (fr)
  • German (de)
  • Greek (el)
  • Indonesian (id)
  • Italian (it)
  • Japanese (ja)
  • Korean (ko)
  • Malay (ms)
  • Norwegian Bokmål (nb-NO)
  • Polish (pl)
  • Portuguese Brazil / Portugal (pt-BR/pt-PT)
  • Russian (ru)
  • Serbian (sr)
  • Slovak (sk)
  • Slovenian (sl)
  • Spanish (es)
  • Swedish (sv)
  • Thai (th)
  • Turkish (tr)
  • Ukrainian (uk)
  • Welsh (cy)

By default, the PdfView localization will mirror the CurrentUICulture of your UWP application. There are two ways of overriding this default locale.

The first way is through the ViewState when showing a new document:

1
2
3
4
await PDFView.Controller.ShowDocumentWithViewStateAsync(documentSource, new ViewState
{
    Locale = "nl"
});

The second way is at runtime, through the Controller:

1
await PDFView.Controller.SetLocaleAsync("pt-BR");

If either your application language or the language specified are not supported, the PdfView will automatically detect the closest language. If it is unable to, the locale will default to English.

To get a list of supported locales at runtime, you can use the following:

1
await PDFView.Controller.GetSupportedLocalesAsync();

The current PdfView locale code is also available:

1
await PDFView.Controller.GetCurrentLocaleAsync();