> For the complete documentation index, see [llms.txt](https://xoops.gitbook.io/xlanguage-tutorial/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xoops.gitbook.io/xlanguage-tutorial/operating-instructions.md).

# Operating Instructions

1. install "xLanguage" as a regular module
2. select basic languages (from an available language list) and add extended languages (after selecting basic language) from module Admin page for instance, to make language switch between: English, Simplified Chinese (gb2312), Traditional Chinese (big5) and UTF-8 Chinese:

   base 1:

   * name: english;
   * description(optional): English;&#x20;
   * charset: iso-8859-1;&#x20;
   * code: en (or another like "xen", not a true language code, just the tag for indicating English content)

   base 2:

   * name: schinese;&#x20;
   * description(optional): Simplified Chinese;&#x20;
   * charset: gb2312;&#x20;
   * code: zh (or anyother like "sc", not a true language code, just the tag for indicating Chinese content)

     ***extended lang of schinese***&#x20;

     1\) name: tchinese;

     * description(optional): Traditional Chinese;&#x20;
     * charset: big5&#x20;
     * code: zh-TW (the true language code of Traditional Chinese)&#x20;
     * base: schinese

       extended lang of schinese&#x20;

     2: name: utf8;

     * description(optional): Simplified Chinese UTF-8;&#x20;
     * charset: UTF-8&#x20;
     * code: zh-CN (the true language code of Simplified Chinese)&#x20;
     * base: schinese
3. make the block "language selection" visible
4. add multilingual content with according tags specified for each base language (in step 3) to your modules, templates or themes\[Skip this step if you do not use multi-language content display but only use charset encoding]:

   wrap content of each language with respective tag specified in step 3: \[langcode1]Content of the language1\[/langcode1] \[langcode2]Content of the language2\[/langcode2] \[langcode3]Content of the language3\[/langcode3] ...

   if two or more languages have same content, you do not need add them one by one but use delimiter "|": \[langcode1|langcode2]Content shared by language1&2\[/langcode1|langcode2] \[langcode3]Content of the language3\[/langcode3] ...

   A real example: suppose the lang\_codes specified in step 4 are: English-en; French-fr; SimplifiedChiense-sc: My XOOPS\[sc]我的XOOPS\[/sc]

   OR:

   \[english|french]This is my content in English and French\[/english|french]\[schinese]这是我在中国的内容\[/schinese]
5. automatic conversion of content from one charset(extended language) to another \[Actually on action needed in this step]
6. **if** you would like to insert hardcoded scripts for language switch in your theme or any template besides the language selection box:

   1\) modify /modules/xlanguage/api.php "$xlanguage\_theme\_enable = true;"

   2\) config options "$options = array("images", " ", 3); // display mode, delimitor, number per line";

   3\) insert <{$smarty.const.XLANGUAGE\_SWITCH\_CODE}> into your theme or template files anywhere you prefer it present


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://xoops.gitbook.io/xlanguage-tutorial/operating-instructions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
