Issue
- When using a paginator component on a site, the links to the different pages (e.g., "Page 1", "Page 2") are displayed in English.
- These labels do not get translated even when the site's language is set to a different language, such as Spanish.
Environment
- Liferay DXP 7.4
- 2023.Q4+
Resolution
This is the expected behavior. By design, the language key for the paginator, page-x, must be translated manually. There are two methods to add the required translations:
-
Language Override Tool (Recommended)
- This tool is available in Liferay DXP 7.4 U4+ and is the recommended approach.
- Navigate to the Control Panel → Configuration → Language Overrides.
- Add a new override for the key
page-xfor each language you need. For example, for Spanish, the value would bePágina {0}.
-
Resource Bundle Module (Alternative)
- You can create a custom module that provides a resource bundle to override the global language properties.
- This method is useful for automating the deployment of translations across different environments, as the translations will be included in the deployed module.
Additional Information