Thanks Michael and Ryan, I think this is what I'm looking for. Ryan, any
chance to see a schema of the map:map object, is it inspired by the
translate.xqy Michael mentioned? Or based on a "bundle" concept that is
generally known (except by me ;-))?

Looking forward to forking it!

cheers,
Jakob.



On Tue, Feb 19, 2013 at 8:13 PM, Ryan Dew <[email protected]> wrote:

> I'm sure it can be improved, but if you want to see an example of a
> library that makes use of map:map objects and server fields, like Mike
> mentioned, you can go here:
> https://github.com/ryanjdew/XQuery-i18n/blob/master/i18n.xqy
>
> -Ryan Dew
>
>
> On Tue, Feb 19, 2013 at 10:58 AM, Michael Blakeley <[email protected]>wrote:
>
>> Have you looked at /MarkLogic/appservices/utils/translate.xqy yet? It's
>> undocumented and may not do everything you want, but it might offer some
>> ideas.
>>
>> For a large lookup-table I would consider using map:map XML
>> serialization. That way you can build the map quickly from stored XML, and
>> lookups via map:get will be very fast. For even more speed you could cache
>> the map in a server-field, with versioning to handle updates.
>>
>> -- Mike
>>
>> On 19 Feb 2013, at 07:16 , Jakob Fix <[email protected]> wrote:
>>
>> > Hi,
>> >
>> > this may be slightly off-topic for the list .... say, you want to
>> maintain an application that provides several user interface languages
>> (say, English, French and German), are there any best practices on managing
>> labels and static text?
>> >
>> > I'm thinking of having a simple look-up XML file that contains the
>> labels indexed by language. But then, the question is how to deal with
>> plural forms, interspersing dynamic bits (like "We have found " + 11 + "
>> hits.") and all the other fun bits. I know that this is a general headache,
>> and that there are solutions like gettext (and others?). Is there an
>> implementation for XML, by any chance?
>> >
>> > Any experience with that in the context of MarkLogic?  Also, would a
>> look-up XML be efficient when used via xquery and xslt?
>> >
>> > I'd be grateful for any pointers.
>> >
>> > cheers,
>> > Jakob.
>> > _______________________________________________
>> > General mailing list
>> > [email protected]
>> > http://developer.marklogic.com/mailman/listinfo/general
>>
>> _______________________________________________
>> General mailing list
>> [email protected]
>> http://developer.marklogic.com/mailman/listinfo/general
>>
>
>
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
>
>
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to