Руководство пользователя Отмена

Support for language variables

  1. RoboHelp User Guide
  2. Introduction
    1. Get to know RoboHelp workspace
    2. What's new in RoboHelp 2022 release
      1. What's new in Update 4
      2. What's new in Update 3
      3. What's new in Update 2
      4. What's new in Update 1
    3. Fixed Issues in RoboHelp
    4. RoboHelp System Requirements
    5. Download RoboHelp on Windows and macOS
    6. Download and install Adobe app
    7. RoboHelp FAQs
    8. What's new in RoboHelp 2020 release
      1. What's new in Update 8
      2. What's new in Update 7
      3. What's new in Update 6
      4. What's new in Update 5
      5. What's new in Update 4
      6. What's new in Update 3
      7. What's new in Update 2
      8. What's new in Update 1
  3. Projects
    1. Plan your RoboHelp project
    2. Create a project
    3. Manage projects
    4. Work with topics and folders
    5. Generate reports
    6. Work with context-sensitive help
    7. Manage References
    8. Set preferences in RoboHelp
  4. Collaborate with authors
    1. Collaborate using Git
    2. Collaborate using SharePoint Online
    3. Collaborate using Azure DevOps (Team Foundation Server)
  5. PDF Layout
    1. PDF templates
    2. Design a page layout
    3. Publish PDF output
    4. Work with the common content styles
    5. Components of a PDF template
    6. Support for language variables
    7. Customize PDFs
  6. Editing and formatting
    1. Format your content
    2. Create and manage cross-references
    3. Create and manage links
    4. Single-source with snippets
    5. Work with images and multimedia
    6. Create and use variables for easy updates
    7. Work with Variable Sets
    8. Use Find and Replace
    9. Auto save your content
    10. Side-by-side editing in Split View
    11. Use the Spell Check feature
    12. Create and Edit Bookmarks
    13. Insert and update fields
    14. Switch between multiple views
    15. Autonumbering in CSS
  7. Import and linking
    1. Import Markdown files into a project
    2. Import Word documents into a project
    3. Import FrameMaker documents into a project
  8. TOCs, indexes, glossaries, and citations
    1. Create and manage a Table of Contents
    2. Create and manage an index
    3. Create and manage a glossary
    4. Create and manage citations
    5. Create and manage browse sequences
    6. Work with See Also and Related Topics
  9. Conditional content
    1. What is conditional content
    2. Create and apply condition tags
    3. Configure output presets for conditional content
    4. Optimize and manage conditional content
  10. Microcontent
    1. Microcontent
  11. Review and Collaboration
    1. Review and Collaboration
  12. Translation
    1. Translating content to multiple languages
    2. Configure a translation framework for a service provider
  13. Generating output
    1. Generate output
    2. Generate Frameless output
    3. Generate Knowledge Base output
    4. Generate PDF output
    5. Generate Responsive HTML5 output
    6. Generate Word Document output
    7. Generate Content Only output
    8. Generate eBook output
    9. Generate Microsoft HTML Help output
    10. Generate Mobile App output
  14. Publish output
    1. Publish to a RoboHelp Server
    2. Publish to an FTP server, a Secure FTP server, or a File System
    3. Publish to SharePoint Online
    4. Publish to Zendesk Help Center
    5. Publish to Salesforce Knowledge Base
    6. Publish to ServiceNow Knowledge Base
    7. Publish to Zoho Knowledge Base
    8. Publish to Adobe Experience Manager
    9. Publish to Atlassian Confluence Knowledge Base
  15. Appendix
    1. Adobe RoboHelp Scripting Reference
    2. RoboHelp keyboard shortcuts

RoboHelp provides the feature to use language variables. You can use language variables to define localized strings in the PDF output or to localize any static text in the output templates. You can use CSS styles to localize the strings coming from a CSS.

Use language variables in the PDF output

You can use language variables to define a localized version of the out-of-the-box labels like Note, Caution, and Warning or static text in the PDF output. The variable name is the same for all languages but can have different values for the various languages. You can update the value for these variables in one or more languages, and then the localized value is automatically picked in the PDF output.

For example, you can have the following ways to present the label Note in the PDF output:

  • English: Note
  • French: Remarque
  • German: Hinweis
Chapter output

Примечание.

If the value for any variable isn’t defined in a particular language, then RoboHelp picks the string from the language of the UI (User Interface of the application) as a fallback mechanism.

If you've not defined the value in the language of the UI, it looks for English (en_us), or else it picks the English(en) value and displays the same in the PDF output.

Types of language variables

RoboHelp supports two types of variables: Application and User variables.

Application variables

RoboHelp provides a set of predefined or out-of-the-box application variables. You can use these predefined variables to add information about a document specific to RoboHelp projects. For example, the chapter-number variable, if included in a page, displays the chapter number to which the page belongs. The author-label variable displays the name of the document author.

Примечание.

You can override the value for an application variable.

User variables

You can also create new language variables. For example, you can create a user variable Publisher for the label of the publisher for the document.

Примечание.

You should have administrative privileges to create user variables and edit the application variables.

Language variable

Add a new language variable

  1. In the output tab, select Language Variables from the left panel.

  2. Select Edit to open the Language Variables window. The application and the user variables present in the selected language are listed in alphabetical order. The values are displayed according to the selected language. For example, if you select the French language, “Tip” is displayed as “Conseil.”

  3. From the Language dropdown, select the desired language in which you want to edit a variable.

    Примечание.

    If you don't view the desired languages, enable the desired language from the Language Variable Settings. Select Settings  to open the Language Variables Settings dialog.

  4. Enter the variable name in the Name column and its value in the Value column.

    Примечание.

    You can use any HTML content as a variable value to display the variable value in specific formatting. For example, you can add <b> tag to the variable value to display the Publisher in bold.

  5. Select Add Language Variable to add a new language variable to the selected language. Adding a variable to one language automatically adds it to all languages. You cannot create a variable with the same name as an existing variable. An error is displayed.

    Примечание.

    If you don’t select Add Language Variable, the variable isn't created and added to the list.

Options for a language variable

Hover over the variable to view the   menu for it.

language-variable-user-options

You can preview both application and user variables. To view how the variable’s value is displayed in the output, select Preview from the   menu of the selected variable.
You can also choose to Delete or Duplicate the user variables. Deleting a variable from one language automatically deletes it from all languages.

Edit or revert the application variables

You can also edit the values for an application variable. Later, you can revert an application variable to the original value. Revert Variable appears for an application variable with a changed value

Use language variables in the output templates

You should add language variables in your localized documents. You can insert these language variables within the page layout that appears across different pages in your localized documents. For example, you can add the language variable for the author-name that appears in the page layout’s header area (or any other part like the footer or body).

language-variable-page-layout

The following screenshot shows the author and the brand name localized in the PDF output generated for the French language.

To insert a language variable like your copyright label in the header area, perform the following steps:

  1. Open the required page layout for editing.
    Примечание.

    View Customize a PDF template section for opening a page layout for customization or editing.

  2. Select the header to make it active to insert a variable.
  3. Select Insert Variable in the toolbar.
  4. In the Insert Variable pop-up, select the name of the language variable to be inserted and select Insert to insert it in the header area.

    Примечание.

    You can also enter the search string in the text box. The variable names containing the given string are filtered and displayed in the list.
    The selected language variable is inserted in the header area.

language-variable-header

Apply content style to language variables

Besides the value you assign to a language variable, you can also use HTML tags to display the variable value in specific formatting. For example, you can display the value of the publisher-label in bold.

 

  • You can also format the styles of the values using tag. For example, using the page-number language variable, you can display the page number in Roman number format in English and specify the format for other languages.

    Value for English:
    <span data-field="page-number" data-format="upper-roman">1</span>

    Value for Tamil:
    <span data-field="page-number" data-format="tamil">1</span>

    Similarly, you can add language variables and format other fields listed in the Insert Fields feature of the page layouts. For more details on adding fields, view Add fields and metadata.
  • You can also add localized images in the values. For example, you can add an image icon in the chapter-number language and get localized images of the icon in the PDF output.

    For English, the variable value for an image can be like <img src="banner-en.jpg">, and for the same variable in German, it can be <img src="banner-de.jpg">. So, it picks up the images depending on the language.

Localize the strings using CSS styles

Using CSS styles, you can also localize the strings used in Autonumber like Chapter, Section, Figure, and Table. As these strings come from CSS files, you cannot localize them using language variables. To localize these strings, you can create CSS styles for each language in which you want to localize them.
For example, you can use the following CSS to display the Chapter prefix and the corresponding number format in various languages.
For example, you can use the following CSS to display Chapter as Hoofdstuk in German and the chapter number in decimal format. While for Japanese, you can use the Japanese number format to show the chapter numbers in the TOC.

// for English
h1:before {
  counter-increment: h11;
  content: "Chapter " counter(h11, decimal)".";
}

// for German
:root:lang(de) h1:before {
  content: "Hoofdstuk " counter(h11, decimal)".";
}

// for Japanese
:root:lang(ja) h1:before {
  content: "章 " counter(h11, japanese-formal)".";
}

The following screenshots display the strings localized in German and Japanese PDF output.

Output_chapter numbers

Format the prefixes

Using CSS styles, you can also format the prefixes. For example, you can format the label Note to appear in red color in the PDF output of various languages.

.note .prefix-content
{
color: red;
}

 Adobe

Получайте помощь быстрее и проще

Новый пользователь?

Adobe MAX 2024

Adobe MAX
— творческая конференция

С 14 по 16 октября очно в Майами-Бич и онлайн

Adobe MAX

Творческая конференция

С 14 по 16 октября очно в Майами-Бич и онлайн

Adobe MAX 2024

Adobe MAX
— творческая конференция

С 14 по 16 октября очно в Майами-Бич и онлайн

Adobe MAX

Творческая конференция

С 14 по 16 октября очно в Майами-Бич и онлайн