function get_locale_stylesheet_uri() {}

Retrieve localized stylesheet URI.
The stylesheet directory for the localized stylesheet files are located, by default, in the base theme directory. The name of the locale file will be the locale followed by ‘.css’. If that does not exist, then the text direction stylesheet will be checked for existence, for example ‘ltr.css’.

Source code

function get_locale_stylesheet_uri() {

	global $wp_locale;

	$stylesheet_dir_uri = get_stylesheet_directory_uri();

	$dir = get_stylesheet_directory();

	$locale = get_locale();

	if ( file_exists("$dir/$locale.css") )

		$stylesheet_uri = "$stylesheet_dir_uri/$locale.css";

	elseif ( !empty($wp_locale->text_direction) && file_exists("$dir/{$wp_locale->text_direction}.css") )


No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: