Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Accessing language on companion app

ANSWERED

 

Hi,

I have a problem with the companion part of my clock face. When I want to access the language via the locale import then I just get an "Uncaught ReferenceError: language is not defined"

 

Here's my code:

import { locale } from "user-settings";
//.....
//.....
//.....
console.log(locale.language);

Is this import not active for the companion app and do I really have to get the language via the messaging API from the app?

 

Following permissions are active:

"requestedPermissions": [
  "access_activity",
  "access_heart_rate"
],

Thank you in advance.

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Sorry, my fault. I placed the language variable in the wrong position.

View best answer in original post

Best Answer
0 Votes
1 REPLY 1

Sorry, my fault. I placed the language variable in the wrong position.

Best Answer
0 Votes