Skip to content
This repository

Internationalization of the theme #21

Merged
merged 2 commits into from over 2 years ago

3 participants

Fx Bénard David Miles Tim Murtaugh
Fx Bénard

i created the function and the po file for it

added some commits August 12, 2011
Fx Bénard * Create the text domain function
* Name html5reset
* Create a few strings
* Move the <h2> tag outside the string
7562da6
Fx Bénard * Create the .po and .mo file d534993
Tim Murtaugh murtaugh merged commit 8aa6329 into from August 15, 2011
Tim Murtaugh murtaugh closed this August 15, 2011
David Miles

This edit is an error. The protocol should've been changed to https and not deleted completely, as now it does not load jQuery and breaks the javascript.

Thanks for the note, i made the change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 2 unique commits by 1 author.

Aug 12, 2011
Fx Bénard * Create the text domain function
* Name html5reset
* Create a few strings
* Move the <h2> tag outside the string
7562da6
Fx Bénard * Create the .po and .mo file d534993
This page is out of date. Refresh to see the latest.
2  404.php
... ...
@@ -1,6 +1,6 @@
1 1
 <?php get_header(); ?>
2 2
 
3  
-	<?php _e('<h2>Error 404 - Page Not Found</h2>','html5reset'); ?>
  3
+	<h2><?php _e('Error 404 - Page Not Found','html5reset'); ?></h2>
4 4
 
5 5
 <?php get_sidebar(); ?>
6 6
 
13  functions.php
... ...
@@ -1,4 +1,11 @@
1 1
 <?php
  2
+        // Translations can be filed in the /languages/ directory
  3
+        load_theme_textdomain( 'html5reset', TEMPLATEPATH . '/languages' );
  4
+ 
  5
+        $locale = get_locale();
  6
+        $locale_file = TEMPLATEPATH . "/languages/$locale.php";
  7
+        if ( is_readable($locale_file) )
  8
+            require_once($locale_file);
2 9
 	
3 10
 	// Add RSS links to <head> section
4 11
 	automatic_feed_links();
@@ -8,7 +15,7 @@
8 15
 		function core_mods() {
9 16
 			if ( !is_admin() ) {
10 17
 				wp_deregister_script('jquery');
11  
-				wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"), false);
  18
+				wp_register_script('jquery', ("//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"), false);
12 19
 				wp_enqueue_script('jquery');
13 20
 			}
14 21
 		}
@@ -25,9 +32,9 @@ function removeHeadLinks() {
25 32
     
26 33
     if (function_exists('register_sidebar')) {
27 34
     	register_sidebar(array(
28  
-    		'name' => 'Sidebar Widgets',
  35
+    		'name' => __('Sidebar Widgets','html5reset' ),
29 36
     		'id'   => 'sidebar-widgets',
30  
-    		'description'   => 'These are widgets for the sidebar.',
  37
+    		'description'   => __( 'These are widgets for the sidebar.','html5reset' ),
31 38
     		'before_widget' => '<div id="%1$s" class="widget %2$s">',
32 39
     		'after_widget'  => '</div>',
33 40
     		'before_title'  => '<h2>',
BIN  languages/fr_FR.mo
Binary file not shown
26  languages/fr_FR.po
... ...
@@ -0,0 +1,26 @@
  1
+msgid ""
  2
+msgstr ""
  3
+"Project-Id-Version: HTML5-Reset-WordPress-Theme\n"
  4
+"Report-Msgid-Bugs-To: \n"
  5
+"POT-Creation-Date: 2011-08-12 13:40+0100\n"
  6
+"PO-Revision-Date: \n"
  7
+"Last-Translator: Fx Benard <fxbenard@gmail.com>\n"
  8
+"Language-Team: fxbenard <fxbenard@gmail.com>\n"
  9
+"MIME-Version: 1.0\n"
  10
+"Content-Type: text/plain; charset=UTF-8\n"
  11
+"Content-Transfer-Encoding: 8bit\n"
  12
+"X-Poedit-Language: French\n"
  13
+"X-Poedit-Country: FRANCE\n"
  14
+"X-Poedit-SourceCharset: utf-8\n"
  15
+"X-Poedit-KeywordsList: __;_e\n"
  16
+"X-Poedit-Basepath: ../\n"
  17
+"X-Poedit-SearchPath-0: .\n"
  18
+
  19
+#: 404.php:3
  20
+msgid "Error 404 - Page Not Found"
  21
+msgstr "Erreur 404 - Page Non Trouvé"
  22
+
  23
+#: functions.php:30
  24
+msgid "These are widgets for the sidebar."
  25
+msgstr ""
  26
+
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.