Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#37055 closed defect (bug) (wontfix)

Translations for plugin in plugin

Reported by: sebastian.pisula Owned by:
Priority: normal Milestone:
Component: I18N Version:
Severity: normal Keywords: close
Cc: Focuses:

Description

why translations for plugins in plugin (load_plugin_textdomain) must have domain before locale ?

$mofile = $domain . '-' . $locale . '.mo';

I have plugin with domain "my-plugin" and dir languages so WP search languages/my-plugin-pl_PL.mo

In plugin lang dir should looking for languages/pl_PL.mo

Change History (2)

#1 @swissspidy
10 years ago

  • Component GeneralI18N
  • Keywords close added

That's mostly for historical reasons I think and not something that you should worry about because

a) inside wp-content/languages domain-locale.mo totally makes sense.
b) every plugin on dotorg should use language packs
c) load_plugin_textdomain() is therefore needed anymore with 4.6+
d) changing this for no reason would negatively impact performance because of additional file existence checks.

#2 @dd32
10 years ago

  • Milestone Awaiting Review
  • Resolutionwontfix
  • Status newclosed

I agree that this isn't something we should change, although for plugins which bundle their own translations it means that they've got longer filenames, it doesn't cause any issue and supporting locale-only.mo would require extra filesystem checks for no tangible benefit.

Note: See TracTickets for help on using tickets.