On Fri, Aug 17, 2012 at 2:00 AM, Michael Fields <span dir="ltr"><<a href="mailto:michael@mfields.org" target="_blank">michael@mfields.org</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Hello!<div><br></div><div>I added a new section to the Child Theme page in the Codex. I believe that that represents the best practice in preparing a child theme for translation. I just wanted to get everyone's opinion on the process. I would like to work out any issues with the process and have to most up-to-date best practice solution right in the Codex.</div>
<div><br></div><div>Here's a link:</div><div><a href="http://codex.wordpress.org/Child_Themes#Internationalization" target="_blank">http://codex.wordpress.org/Child_Themes#Internationalization</a></div></div></blockquote>
<div><br></div><div>The one thing is that load_child_theme_textdomain() is actually kind of lame.</div><div><br></div><div>load_theme_textdomain( 'parent-theme' ) looks in the theme's root directory for a .mo file. Obviously, /languages is preferred.</div>
<div><br></div><div>load_child_theme_textdomain( 'child-theme' ) looks in the child theme's root directory for a .mo file. Obviously, /languages is preferred.</div><div><br></div><div>When you pass a $path to either, it considers it to be absolute. That means both functions work identically if a path is passed to it (get_template_directory() . '/languages' versus get_stylesheet_directory() . '/languages).</div>
<div><br></div><div>What I'd like to do is make both accept a relative path, and then load_child_theme_textdomain() is actually useful. But in the examples on the Codex page, it might as well be load_theme_textdomain().</div>
<div><br></div><div>Nacin</div></div>