internationalizationsonos

Sonos SMAPI: how to internationalize containers?


I'm trying to get our Music Service's SMAPI validated with Sonos. Automated tests passed. I'm now getting what looks like the results of manual QA tests from the Sonos support.

In the "Browse" category, a test named "Is an english translation provided for all containers?" is marked as failed with the notice "Service is in German". We are structuring our music service content by means of hierarchical mediaCollections. Since we're a Germany-based company, the containers (essentially music genres) have german titles.

We'd be happy to provide english translations if need be, but I can't seem to find how I'm supposed to add these translations in the Sonos SMAPI Documentation.

Could anybody please point me into the right direction?


Solution

  • There are two options for localizing containers.

    The first is to use the Accept-Language HTTP header which is sent on each request and have your server choose the correct language to return in the getMetadata response.

    The second option is to use display types. For each container return a different displayType in the getMetadata response. Then in the presentation map file map the display type to a specific string id.

    <DisplayType id="newRelease">
      <Lines>
        <Line stringId="NEW_RELEASE"/>
      </Lines>
    </DisplayType>
    

    Then in the strings file you can provide multiple localizations for the NEW_RELEASE string and Sonos will do the work of choosing the correct localized string.