Legacy Dev Forum Posts

 View Only

Sign Up

Change presence language to german

  • 1.  Change presence language to german

    Posted 06-05-2025 18:04

    vrvoice1 | 2016-07-14 11:44:08 UTC | #1

    Hi, if I logged in on mypurecloud.ie with the language "German" I got german presence names. When I build my own client with the platform Api I get only english presence names. Where can I change that?

    Regards,

    Sven


    tim.smith | 2016-07-14 14:01:46 UTC | #2

    When you get a user's presence, for example via UsersApi.GetMe(new List<string>{"presence"}), you get back a UserMe object, which has a property named presence, which is a UserPresence object. The property PresenceDefinition is of type OrganizationPresence, which has a Dictionary<string, string> called LanguageLabels. This is where the localized strings are. For example, to get the english version of the label, you'd retrieve the value for key "en_US". Enumerate the keys to see what options are available for the status.

    As a coding best practice, you should try to get the locale you want and then should fall back to "en_US" or the first thing in the list if you can't find your localized language.


    vrvoice1 | 2016-07-14 13:51:20 UTC | #3

    Hi Tim,

    I have seen that but in this LanguageLabels Dictionary<string, string> I get only the english (en_US) names: <img src="//inin-prod-use1-developerforum.s3.amazonaws.com/original/1X/b8361831b613aeaf26a8d9ef1c35e747785a8149.PNG" width="690" height="419">

    Regards,

    Sven


    tim.smith | 2016-07-14 14:01:00 UTC | #4

    I don't have anything localized in my org currently. Let me give it a try and see what I can find.


    tim.smith | 2016-07-14 14:59:09 UTC | #5

    Bad news: The product does not currently have any localized presence strings; the API is just stubbed out to support it when they're implemented. You will only ever get "en_US" currently. The Collaborate UI does the localization to override the values in the API.

    Good news: There is a project to add localized strings to the system presences. However, there isn't an ETA currently.

    To work around this, you have two options:

    1. Do what the Collaborate UI does - just ignore the strings that the API gives you and use your own localized strings. The system presence IDs will never change, so you can create a map of system presence ID to the string you want to use for localization.
    2. Create custom presences with localization - If you use POST /api/v2/presencedefinitions, you can create new presences and specify all of the localization values you want to have. This has a side effect, however. The collaborate UI will show all of your custom presence definitions in addition to the existing system presences. There is currently no way to limit the presences available to a user to hide the default system presences (that's a future roadmap idea).

    vrvoice1 | 2016-07-18 06:13:02 UTC | #6

    Hi Tim, ok I would try one of this work arounds. Thanks

    Regards, Sven


    system | 2017-08-28 19:25:16 UTC | #7


    This post was migrated from the old Developer Forum.

    ref: 133