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: Localization in 7.2
Hi,
Using Liferay 7.2.1 ga2
We had enable two locale for portal earlier en_GB and en_US. All the web content was translated in both Locale.
Now we want to keep only one Locale en_US and remove other. Can we some how delete all translations of en_GB for web contents?
Is it possible to delete Locale translation?
Using Liferay 7.2.1 ga2
We had enable two locale for portal earlier en_GB and en_US. All the web content was translated in both Locale.
Now we want to keep only one Locale en_US and remove other. Can we some how delete all translations of en_GB for web contents?
Is it possible to delete Locale translation?
The only way I see to do this is to delete them using a script to update all content xml structures (and titles and descriptions of course, but there it is easier, since you can simply set titleMap/descriptionMap)
So, you would need to delete the available locales, maybe update the default-locale (use JournalArticle.setDefaultLanguage()) and remove the dynamic content entries for the languages you don't need.
So, you would change:
So, you would need to delete the available locales, maybe update the default-locale (use JournalArticle.setDefaultLanguage()) and remove the dynamic content entries for the languages you don't need.
So, you would change:
<!--?xml version="1.0"?-->
<root available-locales="fr_FR,en_US" default-locale="en_US">
<dynamic-element name="content" type="text_area" index-type="text" instance-id="nofk">
<dynamic-content language-id="fr_FR"><p>test2</p></dynamic-content>
<dynamic-content language-id="en_US"><p>test</p></dynamic-content>
</dynamic-element>
</root>
to<!--?xml version="1.0"?-->
<root available-locales="en_US" default-locale="en_US">
<dynamic-element name="content" type="text_area" index-type="text" instance-id="nofk">
<dynamic-content language-id="en_US"><p>test</p></dynamic-content>
</dynamic-element>
</root>
Please take care to do this through the JournalArticle API, don't do this e.g. directly in the database!!
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™