Ticket #6974 (new enhancement)

Opened 2 months ago

Delay loading of l10n string files

Reported by: mark-k Assigned to: anonymous
Priority: normal Milestone: 2.7
Component: i18n Version:
Severity: normal Keywords:
Cc:

Description

Right now, whenever a load_textdomain is called, the translation file is being loaded into the memory. If someone uses an hardcoded localized theme, it is possible that there will not be even a single translation when a page is viewed, and the CPU and memory used in loading the file are simply wasted.

My suggestion is that load_textdomain will not load the file but just make a list of all the domains and their respective translation files, and only when an actual translation is requested for the domain, the translation file will be loaded.