0

I frequently am building a custom theme and one or more custom plugins that are intended for use on only one custom website. Say I have a theme called mytheme and a plugin called mytheme-misc and another plugin called mytheme-example-cpt.

What are the advantages or drawbacks of using a single text domain for translation functions in all 3 places vs making them unique? I understand any plugin built for wider distribution should have a unique text domain, but this is a case where they are all built to work together on the same site.

Same

in theme:

<?php _e('Example Text', 'mytheme'); ?>

in plugin 1:

<?php _e('More Example Text', 'mytheme'); ?>

in plugin 2:

<?php _e('Other Example Text', 'mytheme'); ?>

Unique

in theme:

<?php _e('Example Text', 'mytheme'); ?>

in plugin 1:

<?php _e('More Example Text', 'mytheme-misc'); ?>

in plugin 2:

<?php _e('Other Example Text', 'mytheme-example-cpt'); ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.