Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

getTranslationByKey() Function Only Returns False In The Custom Sheet Sandbox

1682267729
John D.
Pro
Sheet Author
When using the getTranslationByKey() function to do language translation in JavaScript, the function works as documented in a regular game but when used in the custom sheet sandbox it only returns False.  To troubleshoot this, I've verified that my calls to  getTranslationByKey() work correctly by returning the value of the key referenced when in a game, but in a custom sheet sandbox the function returns False every time. Therefore, I know my translation JSON is formatted correctly, the translation key and value pairs are present and referenced correctly, and my JavaScript is working as intended.  It seems that when in a custom sheet sandbox, the getTranslationByKey() function either does not have a path to the translation JSON or does not have read access to the file.
1682290665

Edited 1682290684
Gauss
Forum Champion
Hi John, For this kind of issue if you need other users to help you troubleshoot this I suggest posting it in the character sheet forum to get the best eyes on it.  If on the other hand you are filing a report for the Devs the best place for that is the Help Center as the forums are primarily for users helping users. 
1682366175
John D.
Pro
Sheet Author
Thank you, Gauss!  I'll repost in Help Center as you advise. I appreciate your feedback!
1682492080
John D.
Pro
Sheet Author
I'm embarrassed to follow-up on this post, but felt an obligation to in case someone runs into the same issue and finds this post.  The solution was: reboot.  In my defense, while troubleshooting I did clear cookies/cache, try from an incognito session, and spawned a new browser but in each instance the problem remained.  I never considered a reboot would have any effect, I was just forced to reboot for unrelated reasons and noticed after that the problem was resolved.