Is it possible to use WordPress default / built-in localization without text domain when creating localization for theme or plugin? for example word like __( 'Submit' )
or __( 'Publish' )
or any other common words should already in the WordPress localization dictionary. But if we're not specifying text-domain when creating theme it will not pass theme check. Or is there a text-domain for WordPress default one? Any suggestion?
-
can you add more details to explain what have you tried and what doesn't work as you want ?– mmmCommented Mar 24, 2016 at 9:47
-
I've tested localization without text-domain and using common words already in the wordpress pot file but my theme doesn't pass theme check even though it's working fine– nonsensecreativityCommented Mar 24, 2016 at 10:09
1 Answer
It is possible, and in some cases make sense, but I would advice against thinking that way. Some words in the context of wordpress core admin might be translated differently in the context of a theme.
If the motivation here is to save translation time, then don't bother as any one with translation experience will use software that has a DB of translations and will auto translate such words. In addition common tools (poedit) are text domain blind and can not differentiate between different text domains, therefor it will be hard to not include 'submit' as part of the .pot file even if it is not actually needed to be translated.
Last and very least, loading the core translation is a performance hit that better to avoid if possible.