Message Boards

Liferay.Language.get method is no longer working with string variables

ali ahdab, modified 2 Years ago.

Liferay.Language.get method is no longer working with string variables

New Member Posts: 7 Join Date: 7/14/21 Recent Posts

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

thumbnail
Olaf Kock, modified 2 Years ago.

RE: Liferay.Language.get method is no longer working with string variables

Liferay Legend Posts: 6403 Join Date: 9/23/08 Recent Posts

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?

ali ahdab, modified 2 Years ago.

RE: RE: Liferay.Language.get method is no longer working with string variab

New Member Posts: 7 Join Date: 7/14/21 Recent Posts

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

thumbnail
Olaf Kock, modified 2 Years ago.

RE: Liferay.Language.get method is no longer working with string variables

Liferay Legend Posts: 6403 Join Date: 9/23/08 Recent Posts

Answered on Stackoverflow.

Please do not crosspost, or at least link to your crossposts in all directions.