Skip to content

Multilanguage

For localization, you can use Babel, or you can simply create the necessary contexts and activate the system setting pageblocks_context_aware. Then, a select dropdown with all contexts will be added to the block menu.

languages

You can copy all blocks from one context to another. For more details, you can read in the copying section.

languages

ChatGPT

Settings:

System settingValueDescription
pageblocks_translatorChatGPT
pageblocks_chatgpt_apikeyAPI Key. You can obtain keys here.
pageblocks_chatgpt_modelgpt-4-turbo-2024-04-09She showed the best result for text translation.
pageblocks_chatgpt_prompttranslate from [[+from]] to [[+to]]:The values of "[[+from]]" and "[[+to]]" will be taken from the system setting of the cultureKey context.

context

Example:

chatgpt

DeepL

Settings:

System settingValueDescription
pageblocks_translatorDeepL
pageblocks_deepl_apikeyAPI Key. You can obtain keys here.
pageblocks_deepl_accountFreeFree or Pro. For more details, click here.

DeepLGPT

ChatGPT often faces difficulties in accurately translating short sentences due to a lack of context understanding. DeepL manages this better, but ChatGPT is sometimes more suitable for longer texts. Therefore, a combination of both, named DeepLGPT, represents an optimal solution. You will need to set up system settings for both ChatGPT and DeepL, including an extra parameter called pageblocks_deepl_word_count that determines the maximum number of words. If a text exceeds the word count specified in the pageblocks_deepl_word_count setting, it will be translated using ChatGPT; if it is less or equal, the text will be translated via DeepL.

© PageBlocks 2019-present