Comment on page


[v1.4.0+] Localization for your rendered PDF files
This feature is only available on DocKing v1.4.0 and above.
In case you need to deliver your PDF in multilingual, worry no more. DocKing is finally supporting that 😎
DocKing's Localization is built on top of Laravel Localization, meaning you can use every feature/helper/... from Laravel's Localization.


  • Languages: languages that you want to use from your applications (for example, I want English & Vietnamese, I'll create 2 languages)
  • Translation Groups: for grouping the translation texts
    • E.g.: Base Group, Invoicing Group, etc.
    • Note: if you delete a Translation Group, the associated Translations will be deleted as well.
  • Translations: holding the translation texts

Console UI

You can manage Languages, Translation Groups & Translations in the Console UI.
Translation Groups
Create/Edit Translation

Get the translated texts in Templates

In your Document Templates, you would be able to use these functions to get the translation:
{{ __('key') }}
{{ trans('key') }}
For example: this is my template with some translations.
Hitting "Preview", I'll able to see the rendered version.

Render PDF metadata

From post-v1-document-templates-uuid-pdfs and post-v1-document-templates-uuid-pdfs-async endpoints, you can specify the language in the metadata object
POST api/v1/document-templates/{uuid}/pdfs
metadata: {
"language": "en" // or vi, es,...
And that's all