Hi!
We are working on Stella plugin custom localizations API. In these series of posts I want to tell what you can do with this API.

localization of custom single input metabox

If you have some single input metaboxes, for example, links to video, localize it using

stella_translate_custom_field  function. Lets look a bit closer:

Usage

stella_translate_custom_field( $id, $field_name, $title, $post_type, $context ); 

Parameters

$id
HTML ‘id’ attribute of the edit screen section. Must be the same as in metabox, which will be

localized

$field_name
Label of the input field

$title
Title of the edit screen section, visible to user

$post_type
The type of Write screen on which to show the edit screen section

$context
The part of the page where the edit screen section should be shown

Example

Imagine you already register metabox. So you have something like this:

add_action( 'add_meta_boxes', 'add_single_input_meta_box', 1); 
function add_single_input_meta_box(){ 
   add_meta_box( 'video', 'Link url', 'add_fields', 'post', 'normal' ); 
}
function add_fields(){ 
    global $post; 
    $link = get_post_meta( $post->ID, 'link', true );
    $wp_nonce = wp_create_nonce( 'meta_noncename' );
    $meta_html = <<<meta_html
    <input type="hidden" name="meta_noncename" id="meta_noncename" value="$wp_nonce" />
    <div class="project-options">
       <div class="clearfix">
         <label>Link:</label>
         <input type="text" name="_link" value="$link"/>
       </div>
    </div>
    meta_html;
    echo $meta_html;
}

Now, lets tell Stella to localize metabox.
Add this code to your functions.php:


add_action( 'stella_parameters', 'stella_functions', 1 );
function(){
    stella_translate_custom_field( 'video', 'link', 'Link url', 'post', 'normal' );
}

NOTE: use ‘stella_init’ action instead ‘stella_parametres’ since Stella 1.3 version.

That’s it. Next post will be about post thumbnail localization. See you later!