It’s not difficult to get WordPress in your preferred language. Since WordPress is already translated into most languages you can decide from the start to get it right or you can convert from one language to an existing. Read more about that here.
If you are using Thesis as your theme you’ll notice that the Thesis part of the admin interface and some parts of the public gui are not translated. This is because these parts don’t belong to the standard WordPress installation and because the Thesis theme is only shipped in English. To solve this you’ll have to get the Thesis theme translated yourself. If you’re lucky someone might have done this for you, otherwise you’ll have to do it yourself.
First, make sure that the file wp-config has your preferred language set, i.e. for example
define ('WPLANG', 'sv_SE');
This is part of the process of making the WordPress installation in the preferred language.
In the directory ‘wp-content/themes/thesis_18/lib/languages’ you have a file named ‘thesis.pot’. You can open this in Notepad++ and add the translations yourself for each text string. For each msgid (which is the string in english) you can specify a msgstr (which is the string in your language). Here is what it could look like if you translate to swedish:
msgid "in"msgstr "i"
msgid "by"msgstr "av"
msgid "% comments"msgstr "% kommentarer"
msgid "1 comment"msgstr "1 kommentar"
msgid "0 comments"msgstr "0 kommentarer"
msgid "on"msgstr "den"
msgid "You searched for:"msgstr "Du sökte efter:"
Now you need to take this file, compile it to get a machine readable file.
A good and free software that reads thesis.pot and create a new .mo file (machine code) is the GnuWin GetText. Install this and run it like this:
msgfmt -o sv_SE.mo thesis.pot

Upload the .mo file to to the same place as where thesis.pot is located. When this is done, Thesis will use your translated phrases instead.
Stay tuned and I hope to provide you with a translated file for the swedish Thesis theme soon.
Tagged as:
gnuwin32,
theme,
Thesis,
translation
Importing comments to WordPress
by Niklas Waller on July 29, 2010
in Wordpress
As mentioned before, we are in the process of evaluating WordPress as a candidate for our future blogging platform. This evaluation includes importing all information from the current blog to the possibly new one.
WordPress offers several ways to import data from another system. There are plugins for the major blogging platforms like Blogger, TypePad, LiveJournal and WordPress that can be found in the WordPress admin under Tools – Import. You can also search for importer or import to find more plugins.
Since Wohill is not put on any of these blogging platforms but instead is self-developed we can not use any of these plugins. However, there is a tool that can be found in the same place that allows importing from an RSS-feed. Since Wohill has a validated RSS-feed, this is what I have used. Worth mentioning is that I have downloaded WordPress which means that data tables are created in the same database as the one we use today. What I want said by that is that it is possible to copy data from the old data tables to the new ones without the RSS-importer. But since it exists and importer it is easier and we will use it.
It worked fine. The basic information gets in there. I had problems with the author though. I tried using the author-tag and the dc:creator-tag but neither worked. This was however solved by manually setting the author using SQL-queries in PHPMyAdmin after the import.
The RSS-import only imports posts and we still have comments, tags etc. to take care of and I don’t want to add them manually. There might be a plugin that works for this as well but I solved it this way to get the comments in and associated with the right posts.
Since the data tables from the current and the new platform resides in the same database we can use some SQL to fix this. I used the following to copy the comments from the old comments table to the new.
# Insert commentsINSERT INTO wp_comments (comment_author, comment_author_email, comment_author_url, comment_content, comment_date, comment_post_ID, comment_approved) SELECT a.name, a.email, a.website, a.body, a.publishDate, b.ID, '1' FROM old_comments_table a inner join wp_posts b on (a.postId = b.guid and a.approved = '1')
The comments get in there and also associated with the right posts. The comment count on the posts has not been adjusted though. I searched the web and found a solution for this. Use this code straight off as it is and this issue will be taken care of as well.
# Update comment count on existing postsUPDATE wp_posts wpp LEFT JOIN (SELECT comment_post_id AS c_post_id, count(*) AS cnt FROM wp_comments WHERE comment_approved = 1 GROUP BY comment_post_id) wpc ON wpp.id=wpc.c_post_id SET wpp.comment_count=wpc.cnt WHERE wpp.post_type IN ('post', 'page') AND (wpp.comment_count!=wpc.cnt OR (wpp.comment_count != 0 AND wpc.cnt IS NULL));
Share and Enjoy:
Be the first to comment
Tagged as: comments, import