Прескочи към главното съдържание

How can I add translations for the Welcome Message on the Portal? - База знание / Developer & Reporting / Portal Customization - Deskpro Support

How can I add translations for the Welcome Message on the Portal?

Списък с автори

If you need to support a multi-lingual Portal, you can't use the simple welcome message box in the portal editor.

Instead, you can edit the welcome_box.html template in the portal editor to add different versions of a welcome message based on the language selected in the portal. 

To do this:

1. Go to Admin > User Interface > Portal > Template Editor.

2. Search 'Welcome' and select the welcome_box.html template.

3. Edit the code appropriately and click 'Save'.

Here is an example of the code you could use within this template:

<div class="wrapper">

    <div class="column-full">

        <div class="welcome-block-wrapper">

            <div class="welcome-block-second-border">

                <div class="welcome-block">

                    {% if app.user.language.sys_name == 'default' %} <h1>My Default Title</h1>

                    <p>My Default Content</p> {% elseif app.user.language.sys_name == 'swedish' %} swedish content {% elseif app.user.language.sys_name == 'german' %} <h1>My German Title</h1>

                    <p>My German Content</p> {%endif%}






The section highlighted in bold is what controls the content based on the different languages you define.

This is how that would look in the template editor:

Remember that any languages you want to define here should also be installed as a helpdesk language in Admin > Setup > Languages, so it is selectable for your users on the portal.

4. Click 'Preview Changes' to test how that will appear on your portal within the editor, then 'Save Changes' when you are ready to make that change live on your portal.

Default language view:

German Language View:

Полезен Не беше полезно

32 от 54 души смятат тази страница за полезна

Добави коментар

Моля, логнете се или се регистрирайте, за да оставите коментар.

Подсещане за парола?