Multilingual Applications

Supported Languages

The technologies behind BrainShop work with virtually any languages. To this point we have created contents for the two most popular languages in the world:

  • English
  • Simplified Chinese

If you hope to add a language to the above list, feel free to let us know.

Multilingual Capability

BrainShop provides you with a built-in true multilingual capability. For most cases, you don't need to identify the language of user message. You can simply send the message to BrainShop and it will response in a proper language, typically the language of the messages. Both your application and users don't need to do anything to switch between languages.

    • Can you speak English?
    • English is my first language.
    • 你会中文吗?
    • 正在学。你好!

Multilingual Cells

You can create cells in any language you choose. If your application is multilingual, simply put all languages in the same brain. If you want, you can create a brain for each language and build several monolingual applications.

Using u.input.lang

Typically you will provide output in the same language as the input. In case the cell's input cannot be identified beforehand, you can use conditional output and system user object property u.input.lang together to give proper response for each language. u.input.lang always returns the language for the current user message, which is not absolutely precise but accurate enough for most cases.

Example 1. A conditional output using u.input.lang

Multilingual Attributes

Attributes are used to customize the characters of your virtual robot, like name or gender. Naturally you may want to provide multilingual attributes for your multilingual application. To do so, you just need to define different attributes for different languages, even if they mean the same logically. For example, "name" for robot's name in English and "scName" for one in Chinese. It's recommended to use a language code to prefix the attribute.

Voice Recognition

If your application uses voice recognition, you may need to check how the SDK or API handles language. Some might require a language for better performance. Some simply don't work if no language is provided.

For example, if you speak Chinese to your application but it always replies in English, the most possible cause is the voice recognition uses "English" as working language, for either missing language arguments or giving a wrong language.