-
Notifications
You must be signed in to change notification settings - Fork 2
Multi Language Menus
LeonaMorro edited this page Oct 16, 2017
·
1 revision
You will need nPose V3.10 or newer to use this.
- Set up your project as usual until you are fine with each and every detail.
- Copy all
SET:NCs into your inventory. - Rename all cards to the language of your choice. Also replace the
SETprefix by the upper case 2 letter ISO 639-1 code of the desired language https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes .
Example: if you want to implement a german menu, then rename the cardSET:swimtoDE:schwimmen. Also look inside the card if there is something to be replaced (for example the text of the MENUPROMPT) - Copy all cards back to the object.
- Test your object. If you use the menu with a german viewer you should see the german menu. If your viewer uses any other language you should see the menu defined by the SET: cards.
If you want to see a language but don't want to switch your viewer language you can force the menu to show that language by setting
OPTION|autoLanguage=0|defaultLanguagePrefix=DE(exchange DE (german) by the language code of your choice). Remember to remove this line after you finished your test. - If you want to add another language repeat the steps above.
- this approach is only suitable for menus with a small number of buttons (because of the LSL memory restrictions).
Lead:numberOfAdditionalLanguages = RoundDown(300 / yourNumberOfSETCards) - 1 - The language selection is done automatically. You cannot switch manually to another language (because of the LSL memory restrictions).
- The selection is based on the language string of the viewer. The user can manipulate the string (via the debug settings of the viewer) in a way it becomes unreadable by the script. It will then fallback to the default language (
SET:cards). - Users can also disallow scripts to read their language string, so the script will then fallback to the default language (
SET:cards) - Some strings may be hardcoded into the scripts. They can't be translated.
- The language detection is based on
llGetAgentLanguageYou may want to look at http://wiki.secondlife.com/wiki/LlGetAgentLanguage for some more limitations.
-
Getting started
-
Reference
-
Changelogs
-
Internals