Languages

Menu
Sites
Language
Notification update after language change on wearable

Hi,

I created sample wearable app to display notification on creation. App uses one localization file (en_GB). Galaxy watch is connected to android phone via BT. Phone has en_GB as default language. I open app (notification is posted) -> close app -> change language to different than en_GB on phone -> observe notification board. Notification is not translated. Clearing notification and relaunching application with new language works.

My question is: "Should Tizen OS automatically translate already posted notifications ?". I couldn't find answer in documentation. Do I miss some implementation to make it work automatically without need of relaunching application/clearing old notification message ? "Clear all" tab on notification board is translated automatically.

Thanks.

Code sample:

void createNotification()
{
    notification_h noti = notification_create(NOTIFICATION_TYPE_NOTI);
    if (noti == NULL)
    {
        return;
    }

    int noti_err = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_TITLE, "Title", NULL , NOTIFICATION_VARIABLE_TYPE_NONE);
    if (noti_err != NOTIFICATION_ERROR_NONE)
    {
        notification_free(noti);
        return;
    }

    noti_err = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_CONTENT, "No translation", "some_id", NOTIFICATION_VARIABLE_TYPE_NONE);
    if (noti_err != NOTIFICATION_ERROR_NONE)
    {
        notification_free(noti);
        return;
    }

    noti_err = notification_post(noti);
    if (noti_err != NOTIFICATION_ERROR_NONE)
    {
        notification_free(noti);
        return;
    }
    notification_free(noti);
}

 

Responses

11 Replies
Sana Alvina

This website offers a comprehensive and accurate Rice Purity Test that allows you to assess your experiences and track your personal growth. Don't miss the opportunity to explore this insightful tool and gain a deeper understanding of yourself. Get started today and share your results with friends!

 

bolare bolare

I appreciate your sharing; kindly spread the word more in the future. 

Katherine Hawkins

Oh, I appreciate your post. I just started learning to code so it worked for me.

Ryan Jacob

If you haven't found the information in the documentation, check back in on the documentation regarding notification management and localization on Tizen OS, there may be specific instructions you missed