跳到主要内容

How can I add translations for the Welcome Message on the Help Center? - 知识库 / Using Deskpro / Admin / Help Center - Deskpro Support

How can I add translations for the Welcome Message on the Help Center?

作者列表

If you need to support a multi-lingual Help Center, you will need to edit the Help Center Template, rather than use the simple welcome message box in the Help Center Design tool.

Screenshot 2023-08-01 at 16.40.27.png

Edit the Portal > welcome-box.html template in the Template Editor to add different versions of a Welcome Message based on the language selected in the Help Center by the User.

To do this:

  • Go to Admin > Help Center > Help Center Design > Open Template Editor

  • Select the Portal > welcome-box.html template

Screenshot 2023-08-01 at 16.47.41.png

  • Edit the code appropriately and save.

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

{% if true or theme_option('welcome_box') and (theme_option('welcome_box').title or theme_option('welcome_box').message) %}
<div class="dp-po-homepage-welcome-box">
    <div class="dp-po-block">
	{% if lang_code() == "fr" %}
        <h1>
            Mon titre en français 
        </h1>
        <p>
            Mon contenu en français
        </p>
	{% else %}
				<h1>
            My Default Title
        </h1>
        <p>
            My Default Content
        </p>
	{% endif %}
    </div>
</div>
{% endif %}

In this example, when a User selects French from the dropdown menu they will be shown the Welcome Message in French, if they have any other language selected they will be shown the Default Message you enter.

有帮助 没有帮助

添加一条评论

请登录或注册以提交评论。

是否需要密码提醒?