OK, that is probably fine for most things.
Yes, but the _t function only supports 3 arguments. So 0, 1, and 2 only.
OK, that is probably fine for most things. |
I definitely need to add an entry on Nginx; especially the rewrites as Nginx handles rewrites completely different.
The Nginx section is already in there. It is empty. I had set you as the owner of that item so you should be able to edit the current entry. |
{0} is $site['url'] and {1} is $site['title']. You are basically using the 0, 1, 2, 3 to equate to the position of the parameters as they are listed in the _t() call. Yes, but the _t function only supports 3 arguments. So 0, 1, and 2 only. |
I had basically stepped away from any Dolphin (and now Cheetah) development work for a few years. As I pull things back into focus, maybe I should add to the tutorials or maybe in the Cheetah Docs. I added a section to the Cheetah Docs the other day because I am working on a Cheetah site and the owner was unsure of the actions; how they applied. So I decided to add it to the Cheetah Docs for others. It was based on Nathan's write up. I definitely need to add an entry on Nginx; especially the rewrites as Nginx handles rewrites completely different. |
As I work to understand I look at code. In the forgot.php there is this code snippet: if ($mail_ret) $action_result = _t( "_MEMBER_RECOGNIZED_MAIL_SENT", $site['url'], $site['title'] ); else The language key for this is: '_MEMBER_RECOGNIZED_MAIL_SENT' => 'You have been recognized as a {1} member and your account details have just been sent to you. Once you receive the letter from us, <a href="{0}member.php">log-in here</a>.' {0} is $site['url'] and {1} is $site['title']. You are basically using the 0, 1, 2, 3 to equate to the position of the parameters as they are listed in the _t() call. |
OK, I think I am gaining some ground on this. I see this: function showBlockEcho( $sCaption, $sContent ) { echo DesignBoxContent( _t($sCaption), $sContent, 1 ); }
So the language key is passed to the $sCaption variable and $sCaption is passed to _t(). |
OK, I think I am gaining some ground on this. I see this: function showBlockEcho( $sCaption, $sContent ) { echo DesignBoxContent( _t($sCaption), $sContent, 1 ); }
So the language key is passed to the $sCaption variable and $sCaption is passed to _t(). |
I am a little bit confused. On the Profile Comments block the only place I find _profile_comments is in the install sql file: ('profile', '1140px', 'Comments on member profile', '_profile_comments', 0, 0, 'Cmts', '', 1, 71.9, 'non,memb', 0, 0), I don't see it being run through the _t(). So how is that handled? Does the _t() also handle translations?
|
The {0} replacement is handled in the language key function _t |
In language keys how does the {0} replacement work? Can this be used in the header of blocks where we have such things as Video Albums so that I can have Jim's Video Albums? |