Opened 12 years ago
Closed 12 years ago
#5030 closed enhancement (fixed)
Use load_plugin_textdomain() for loading language files
Reported by: | boonebgorges | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 1.8 | Priority: | high |
Severity: | major | Version: | |
Component: | Core | Keywords: | has-patch |
Cc: | johnjamesjacoby, nacin |
Description
Continuation of conversation begun at https://buddypress.trac.wordpress.org/ticket/4857#comment:20
Summary:
- BP currently uses
load_textdomain()
to load language files. Historically, we've done this because we encourage language pack users to download .mos separately and store them in wp-content/languages, andload_plugin_textdomain()
does not support this location in an obvious way. - However, upcoming changes to the way that language packs are distributed from wordpress.org will require that BP use
load_plugin_textdomain()
https://buddypress.trac.wordpress.org/attachment/ticket/4857/4857.05.patch is a working but clunky patch for accomplishing what needs to be done. nacin has suggested that he has another approach; this might involve changes to load_plugin_textdomain()
(such as un-deprecating the absolute path parameter).
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
4857.05.patch won't work for a custom language or plugin directories.
What I was thinking is call load_plugin_textdomain() for the relative 'bp-languages' path - and if it returns false (and it always will by default), go ahead and do what you do currently. But this will mean that when load_plugin_textdomain() changes, you'll automatically get those goodies.