For internal use only. Force the creation of the index (if not already done). Returns a hash with key-value pairs, where the key is the lower-cased version of the filename, and the value the case-sensitive version of the filename.

Returned is a list of filenames which is used to update the list of MSGIDs when source files have changed. All translation files which belong to a certain DOMAIN are listed.

The EXTENSION filter can be used to reduce the filenames further, for instance to select only po or only mo files, and ignore readme's. Use an string, without dot and interpreted case-insensitive, or a regular expression.

It's always complicated to find the lexicon files, because the perl package can be installed on any weird operating system. Therefore, you may need to specify the lexicon directory or alternative directories explicitly. However, you may also choose to install the lexicon files in between the perl modules.

By default, the filename which contains the package which contains the textdomain's translator configuration is taken (that can be only one) and changed into a directory name. The path is then extended with messages to form the root of the lexicon: the top of the index. After this, the locale indication, the lc-category (usually LC_MESSAGES), and the textdomain followed by .po are added. This is exactly as gettext(1) does, but then using the PO text file instead of the MO binary file.

My module is named Some::Module and installed in some of perl's directories, say ~perl5. The module is defining textdomain my-domain. The translation is made into nl-NL.utf-8 (locale for Dutch spoken in The Netherlands, utf-8 encoded text file).

The translation table is taken from the first existing of these files: nl-NL.utf-8/LC_MESSAGES/my-domain.po nl-NL.utf-8/LC_MESSAGES/my-domain.po nl-NL.utf8/LC_MESSAGES/my-domain.po nl-NL/LC_MESSAGES/my-domain.po nl/LC_MESSAGES/my-domain.po

Then, attempts are made which are not compatible with gettext. The advantage is that the directory structure is much simpler. The idea is that each domain has its own locale installation directory, instead of everything merged in one place, what gettext presumes.