wordpress-piglatin icon indicating copy to clipboard operation
wordpress-piglatin copied to clipboard

Add text domain option

Open rmccue opened this issue 11 years ago • 3 comments

For plugin authors, it's helpful to only have Pig Latin activated for certain text domains, rather than all. This helps to make sure that not only is the text translatable, but it's also in the correct domain.

I'd like to add a new global variable that can be used for this, $piglatin_domains = array('default'), which can be overridden by plugins or in wp-config.

rmccue avatar Feb 04 '14 06:02 rmccue

Limiting domains sounds good.

Why not a filter, instead of a global variable? No translations should be happening before init anyway.

nb avatar Feb 10 '14 08:02 nb

Why not a filter, instead of a global variable? No translations should be happening before init anyway.

With a global variable, I can add it as a one-liner to my wp-config when developing, rather than needing to write a mini-plugin to do it.

rmccue avatar Feb 10 '14 08:02 rmccue

OK, makes sense.

nb avatar Feb 10 '14 08:02 nb