ThemeForest

Should the theme use same "textdomain" for all strings to be localized?

201 posts
  • Has been a member for 2-3 years
  • Sold between 10 000 and 50 000 dollars
  • Bought between 50 and 99 items
  • Referred between 10 and 49 users
  • Exclusive Author
UXbarn says

Hi,

As far as I know, textdomain should be the name of author or the theme itself that is unique enough. I’m now applying the gettext function to all strings in my theme for localization purpose using the same textdomain which is “uxbarn”.

Then I thought about what if using it differently depending on each section in the theme, for example;
  • Theme Options section: “uxbarn_options”
  • Shortcodes section: “uxbarn_shortcodes”
  • CPT section: “uxbarn_cpt”
I used to try to load the strings with different textdomain using WPML plugin and I think it’s great to see those strings grouped into their own contexts and to have their own .po, .mo files.

Just wondering that should I do this?

As a buyer, what do you think? Will this benefit you?

Or I would rather have to use the same textdomain for all strings?

Thank you. :)

by
by
by
by
by