[theme-reviewers] Theme text domain and function name prefix

Justin Tadlock justin at justintadlock.com
Sun Jul 28 18:45:03 UTC 2013


For #2, you could use:

load_textdomain( $domain, $mofile );

Using load_theme_textdomain() multiple times would be problematic 
because it doesn't prefix the mofile name with $domain by default like 
with plugins.

On 7/27/2013 11:40 AM, Chip Bennett wrote:
> That depends: do the "bunch of Themes" *use* a framework?
>
> And, related question (because internationalization isn't my strong 
> suit): can a Theme make multiple calls to load_theme_textdomain()?
>
> If possible, this would be an elegant solution for a Theme shop that 
> has several Themes that all use the same code library (framework):
>
> 1) Theme bootstraps the framework
> 2) Framework calls load_theme_textdomain( $framework_textdomain, 
> $framework_path )
> 3) Theme calls load_theme_textdomain( $theme_textdomain, $theme_path )
>
> Would this even work? If not, why not? And if not, could it be *made* 
> to work?
>
>
> On Sat, Jul 27, 2013 at 9:27 AM, Srikanth Koneru <tskk79 at gmail.com 
> <mailto:tskk79 at gmail.com>> wrote:
>
>     I was hoping theme shops with a bunch of themes can get same
>     exemption as frameworks.
>
>
>     On Sat, Jul 27, 2013 at 6:43 PM, Edward Caissie
>     <edward.caissie at gmail.com <mailto:edward.caissie at gmail.com>> wrote:
>
>         I would still lean towards the general rule of thumb as Theme
>         Name ~> theme slug = prefix = textdomain to maintain a
>         consistency within the project's code.
>
>         Edward Caissie
>         aka Cais.
>
>
>         On Sat, Jul 27, 2013 at 6:55 AM, Thomas from ThemeZee
>         <contact at themezee.com <mailto:contact at themezee.com>> wrote:
>
>             Author slug as function prefix should be fine. Beside the
>             unique text domain the handle (name of stylesheet) used in
>             wp_register_style should also be unique. Can cause some
>             problems with child themes if you use the author slug
>             there and the user has multiple themes of your theme shop
>             installed.
>
>
>             2013/7/27 Emil Uzelac <emil at uzelac.me <mailto:emil at uzelac.me>>
>
>                 There you go :-) I was thinking that some special case
>                 Themes do that, but I was wrong.
>
>                 On Jul 27, 2013 3:06 AM, "Otto" <otto at ottodestruct.com
>                 <mailto:otto at ottodestruct.com>> wrote:
>
>                     Function prefix, sure. Text domain, no. This
>                     should be unique. Prefix
>                     the text domain if you like.
>
>                     -Otto
>
>
>                     On Sat, Jul 27, 2013 at 1:34 AM, Srikanth Koneru
>                     <tskk79 at gmail.com <mailto:tskk79 at gmail.com>> wrote:
>                     > Can the text domain and function prefix be same
>                     for all my themes and can it
>                     > possibly be my theme shop name?
>                     > It will be easy to maintain themes and create
>                     new ones.
>                     >
>                     > _______________________________________________
>                     > theme-reviewers mailing list
>                     > theme-reviewers at lists.wordpress.org
>                     <mailto:theme-reviewers at lists.wordpress.org>
>                     >
>                     http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>                     >
>                     _______________________________________________
>                     theme-reviewers mailing list
>                     theme-reviewers at lists.wordpress.org
>                     <mailto:theme-reviewers at lists.wordpress.org>
>                     http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
>                 _______________________________________________
>                 theme-reviewers mailing list
>                 theme-reviewers at lists.wordpress.org
>                 <mailto:theme-reviewers at lists.wordpress.org>
>                 http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
>
>             _______________________________________________
>             theme-reviewers mailing list
>             theme-reviewers at lists.wordpress.org
>             <mailto:theme-reviewers at lists.wordpress.org>
>             http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
>
>         _______________________________________________
>         theme-reviewers mailing list
>         theme-reviewers at lists.wordpress.org
>         <mailto:theme-reviewers at lists.wordpress.org>
>         http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
>
>     _______________________________________________
>     theme-reviewers mailing list
>     theme-reviewers at lists.wordpress.org
>     <mailto:theme-reviewers at lists.wordpress.org>
>     http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
>
>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20130728/4b145252/attachment.html>


More information about the theme-reviewers mailing list