Next: , Previous: , Up: Pure Scheme internationalization with po-lib   [Contents][Index]


6 How to use po-lib on Hoot

Hoot is a compiler from Scheme to WebAssembly. In order to process the navigator.languages variable, the WebAssembly module where po-lib is included will require the following imports:

document.navigatorLanguagesRef

This function takes no argument and returns an array of strings. Presumably you will want to return navigator.languages.

document.arrayLength

Given an array as its sole argument, this function should return its length as a 32-bit integer.

document.stringArrayRef

Given an array languages and a 32-bit integer index i, this function should return the string languages[i].