cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Instructure
Instructure

Identify the language of user with JS

Jump to solution

Hello Canvas gurus!

We are trying to identify the variable that keeps the language set by the student on their profile. We used to use the variable  ENV.LOCALE to identify the student profile language and it used to work fine but not on the new UI.

This is an example of the code we used to have on the old interface but it's not working on the new UI.

if (ENV.LOCALE === "es_ES")  {

     // Spanish text

} else if (ENV.LOCALE === "en_US")  {

     // English text

}

Any help will be appreciated!

Thanks!

xcotto@nuc.edufarbelaez@instructure.com

1 Solution

Accepted Solutions
Highlighted
Instructure
Instructure

Community,

We were able to complete this task changing the value of the variable for two letters.

184907_pastedImage_1.png

Hope this helps anybody else.

xcotto@nuc.edu

View solution in original post

1 Reply
Highlighted
Instructure
Instructure

Community,

We were able to complete this task changing the value of the variable for two letters.

184907_pastedImage_1.png

Hope this helps anybody else.

xcotto@nuc.edu

View solution in original post