EDIT: Another Option
You could also change the slug based on what's defined in the WPLANG
constant.
Just write a quick function that holds data...
<?php
function wpse30021_get_slug()
{
// return a default slug
if( ! defined( 'WPLANG' ) || ! WPLANG || 'en_US' == WPLANG ) return 'press';
// array of slug data
$slugs = array(
'fr_FR' => 'presse',
'es_ES' => 'prensa'
// etc.
);
return $slugs[WPLANG];
}
Then get the slug where you register your custom post type.
<?php
add_action( 'init', 'wpse30021_register_post_type' );
function wpse30021_register_post_type()
{
$slug = wpse30021_get_slug();
// register your post type, reference $slug for the rewrite
$args['rewrite'] = array( 'slug' => $slug );
// Obviously you probably need more $args than one....
register_post_type( 'wpse30021_pt', $args );
}
The best option, IMO, would be to both give the user an option and provide solid defaults:
<?php
add_action( 'init', 'wpse30021_register_post_type' );
function wpse30021_register_post_type()
{
$slug = get_option( 'wpse30021_cpt_base' );
// They didn't set up an option, get the default
if( ! $slug ) $slug = wpse30021_get_slug();
// register your post type, reference $slug for the rewrite
$args['rewrite'] = array( 'slug' => $slug );
// Obviously you probably need more $args than one....
register_post_type( 'wpse30021_pt', $args );
}