[sldev] Using llGetAgentLanguage() in a different way...
Buckaroo Mu
sldev at bitparts.org
Tue Jan 27 16:20:40 PST 2009
Alissa Sabre wrote:
> Two comments on Marine's message and another on Henri's.
>
> Marine:
>
>> - It obviously masks the real language setting. I don't know whether it is
>> used a lot or not yet (emphasis on "yet"). As the language is optional,
>> scripts have to rely on another way to change their localization anyway.
>>
>
> I believe the llGetAgentLanguage feature is not widely used today. It
> is unfortunate. The reason the feature is not widely used is that the
> function is too primitive to use in LSL script, especially given a
> tight code limit, IMHO.
>
> I hope the mechnism is extended in a future to provide more handy I18N
> interface. An example is llSayTranslated("Hello") which automatically
> looks for the key "Hello" in a notecard named "fr" in the object where
> the executing script is in, and sent the corresponding string taken
> from the notecard to a viewer if the viewer's language preference is
> "fr".
>
>
Would it be possible - would require some server-side programming, for
sure, but would it be possible - to include an implementation of GetText
in the LSL compiler? Just reference your strings as _"Hello world!", and
include the various language translations as specially-named notecards
in the inventory of the object. Actually implementing this in LSL would
be memory-prohibitive, but with the right hooks in the compiler and
script engine, it could be trivial to have the script engine reference
the appropriate language file as determined by the client language selected.
My L$0.02, these statements not evaluated by the FDA, etc.
-Buckaroo Mu
More information about the SLDev
mailing list