Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Liferay.Language.get method is no longer working with string variables
Hi,
I have some old code uses Liferay.Language.get("key"),
After I upgraded to 7.4 I get the key instead of
the corresponded translation so Liferay.Language.get("key")
is not working in Javascript anymore.
Anyone knows about this issue ?
https://help.liferay.com/hc/en-us/articles/4403607020813-Liferay-Language-get-method-is-no-longer-working-with-string-variables-as-of-DXP-7-3
The simplest answer would be that the key you're referring to does no longer exist.
Can you give more exact steps to reproduce? E.g. which key from which module are you expecting from where?
I had liferay 7.0, when you open the ispect ( Ctrl + Shift + I) then
go to the console and write
for english
Liferay.Language.get('login');
"Login"
german language
Liferay.Language.get('login')
"Anmelden"
But Now when I upgraded to Liferay 7.4
I get
for english
Liferay.Language.get('login');
"login"
german language
Liferay.Language.get('login')
"login"
The issue has been reported
https://issues.liferay.com/browse/LPS-123191?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel
https://help.liferay.com/hc/en-us/articles/4403607020813-Liferay-Language-get-method-is-no-longer-working-with-string-variables-as-of-DXP-7-3
Powered by Liferay™