Internationalization of the theme #21

Merged
merged 2 commits into from Aug 15, 2011
View
2 404.php
@@ -1,6 +1,6 @@
<?php get_header(); ?>
- <?php _e('<h2>Error 404 - Page Not Found</h2>','html5reset'); ?>
+ <h2><?php _e('Error 404 - Page Not Found','html5reset'); ?></h2>
<?php get_sidebar(); ?>
View
13 functions.php
@@ -1,4 +1,11 @@
<?php
+ // Translations can be filed in the /languages/ directory
+ load_theme_textdomain( 'html5reset', TEMPLATEPATH . '/languages' );
+
+ $locale = get_locale();
+ $locale_file = TEMPLATEPATH . "/languages/$locale.php";
+ if ( is_readable($locale_file) )
+ require_once($locale_file);
// Add RSS links to <head> section
automatic_feed_links();
@@ -8,7 +15,7 @@
function core_mods() {
if ( !is_admin() ) {
wp_deregister_script('jquery');
- wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"), false);
+ wp_register_script('jquery', ("//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"), false);
wp_enqueue_script('jquery');
}
}
@@ -25,9 +32,9 @@ function removeHeadLinks() {
if (function_exists('register_sidebar')) {
register_sidebar(array(
- 'name' => 'Sidebar Widgets',
+ 'name' => __('Sidebar Widgets','html5reset' ),
'id' => 'sidebar-widgets',
- 'description' => 'These are widgets for the sidebar.',
+ 'description' => __( 'These are widgets for the sidebar.','html5reset' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h2>',
View
BIN languages/fr_FR.mo
Binary file not shown.
View
26 languages/fr_FR.po
@@ -0,0 +1,26 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: HTML5-Reset-WordPress-Theme\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-08-12 13:40+0100\n"
+"PO-Revision-Date: \n"
+"Last-Translator: Fx Benard <fxbenard@gmail.com>\n"
+"Language-Team: fxbenard <fxbenard@gmail.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: French\n"
+"X-Poedit-Country: FRANCE\n"
+"X-Poedit-SourceCharset: utf-8\n"
+"X-Poedit-KeywordsList: __;_e\n"
+"X-Poedit-Basepath: ../\n"
+"X-Poedit-SearchPath-0: .\n"
+
+#: 404.php:3
+msgid "Error 404 - Page Not Found"
+msgstr "Erreur 404 - Page Non Trouvé"
+
+#: functions.php:30
+msgid "These are widgets for the sidebar."
+msgstr ""
+