Wordpress theme and language pack - wordpress

I am building a Wordpress blog system in Spanish and I'd like to have the default theme also translated to "es_ES". I am already running this Wordpress installation in Spanish. What I'd like to know is how to do the same with the default theme (twenty-eleven).
This site allows us to download the po file with the translation: http://translate.wordpress.org/projects/wp/3.2.x/twentyeleven/es/default
But I don't know what to do next...
I'd like to know the process. For I have downloaded the PO and MO files from translate.wordpress.org/projects/wp/3.2.x/twentyeleven/es/… and then uploaded them to domain.com/wp/wp-content/themes/twentyeleven/languages however no change occurred...
Thanks.

This post helped me to understand: http://urbangiraffe.com/articles/translating-wordpress-themes-and-plugins/
The missing information in this tuto is that the languages files must be named just like this: if wordpress is set to "es_CL", the .po and .mo files must be named es_CL.po and es_CL.mo and put in the language folder of the theme.
If the file config.php is correctly set to "es_CL" than the system will use the right language files.

Related

How to place automatically the translation files (.po and .mo) in the wp-content/languages/plugins folder when someone installs the plugin

I'm trying to translate a plugin I published to the WordPress marketplace, but I'm having trouble.
I created the.pot file, compiled the.po and.mo files, and placed them in the /languages folder at wp-content/plugins/name-of-the-plugin. This is only translating the plugin description, it does not translate the plugin setting page that is created when the plugin is installed.
If I copy .po and .mo file and place them under this path: wp-content/languages/plugins/name-of-the-plugin then everything gets translated.
How can I manage to place these translation files automatically into this path (wp-content/languages/plugins/name-of-the-plugin) when someone installs the plugin?
Or please let me know if I'm missing something in this process?

how to view and edit a wordpress php file locally (MAMP)

I am helping out creating a few wordpress templates. I've been sent over the basic content (wp-admin/wp-content/wp-includes folders and other wp-* files).
They've already created a new theme, and one front-page.php file. This file includes "parts" such as get_header and get_footer.
Essentially now they'd like me to create new templates using this theme, and php variables to make updating easier. My question is - how can I view this so I can see what i'm making?
I downloaded MAMP and set up a local server, and if I create a sample .php file in the htdocs folder, that page appears correctly. However when I paste the Wordpress folder that I was sent, nothing loads. Is there a special way to get a front-page.php including partials to load within a theme? Am I missing something obvious here?
You will have to Install WordPress completely in order to make it work. Then you will be able to add your folder in the "Themes" folder of WordPress..
You can Google "How to Install WordPress on Mamp" for more info... you will find plenty of websites helping you.
I also suggest you read a few blog post on how to create WordPress Themes... :)
Good luck

Buddypress: Language not changing

I'm getting crazy because everything seems to be fine, but impossible to get a solution.
I want to translate my buddypress to Spanish.
Seems like I have everything ok:
My language files:
My wp-config
define('WPLANG', 'es_ES');
My config on dashboard: Setted to Spanish
My wordpress version : 4.1.
My wordpress is translated ok once I set the language on the dashboard, anyway the buddypress language does not change.
Any Idea about what could be wrong here??
You need to create and upload the buddypress-es_ES.mo file. The .po files are used to create the .mo file. You don't need to upload the .po files.

wp_get_archives() not translating to french wpml

I am using wpml to translate a wordpress site I am building. I have created a custom theme and am using wp_get_archives() to show the archives in the blog section. When I switch to the french side of the site the dates do not get translated. Does wordpress not automatically have its own translation files on hand?
ok, I figured it out. I had put my custom themes .mo file in both my themes language folder as well as my Wordpress language folder. All I needed to do was replace my .mo in /wp-content/languages with Wordpress' fr_FR.mo. So now both .mo files are being included, and all dates are being translated.

WordPress not recognizing theme in /themes/ folder

Having a really baffling issue with permissions, WordPress and theme files.
I have a fresh install of WordPress and tried uploading the theme I made for my client. It uploaded fine but it doesn't show up in the Manage Themes menu. I checked everything was uploaded and it was. Checked permissions (even set them to 777 at one point) and they were fine. But the theme doesn't show up.
Here are the different scenarios I've tried:
Using the Install Themes menu and uploading a .zip (failed)
Duplicate twentyten folder and contents (worked)
Duplicate twentyten folder and used my theme files (failed)
Duplicate twentyten folder and used my theme files and their style.css (failed)
Uploaded my theme WITHOUT style.css (gave missing style.css error)
Uploaded my theme WITHOUT style.css and put in twentyten/created one from scratch (both failed)
I'm on my clients MediaTemple hosting and I've never encountered this error. Their support has yet to get back to us.
Does anyone have a similar problem? Solution? It's possible I can give you FTP access if needed.
CSS Head (changed values but format and everything is still the same):
/*
Theme Name: Example Theme
Theme URI: http://example.com/
Description: WordPress theme
Author: Company
Version: 1.0
*/
Edit: Trying to access the folder through my browser results in a 403 error (works fine on twentyten). style.css can be viewed from the browser.
If you are using a MULTI-SITE installation of Wordpress, you have to first go into Network Admin, select Themes from the left menu and enable the themes you like to use before they can appear on the "Manage Themes" page in the Site Admin section.
Perhaps you are missing a required template file?
At the very minimum, a WordPress Theme
consists of two files:
style.css
index.php
http://codex.wordpress.org/Theme_Development
On Ubuntu 14.04 you can install the wordpress package simply using sudo apt install wordpress but then you have to set a link to the themes directory.
E.g. for your "newTheme":
ln -s /usr/share/wordpress/wp-content/themes/newTheme /var/lib/wordpress/wp-content/themes
I bet you have some special characters in your templates. This once drove me nuts to find.
Check your Template files and/or rename them until the theme shows up. I used a german "ö" in a templates name.
I had a very similar problem. Spent a few hours before I found that somehow when I moved my local site (probably using All-in-one Wp Migration plugin), a .htaccess file was created in the /wp-content folder. I don't remember what was inside this file but I think it didn't matter.
After removing this file everything was ok.
Is the theme folder name different than everything else? Is the Theme Name in style.css different than everything else?
I am guessing BOMs are the problem. They messed up my validation of a page once, as I tried to remove the BOM. Try using an editor and remove the BOMs. For Notepad++, the text editor I use, I just set the encoding to UTF-8 without BOM and saved. That solved my problem. Of course, your text editor may be different.
As I discovered at the end of tortuous troubleshooting, an old wp-config.php may cause newly installed themes to be undetected and invisible in /wp-admin/themes.php - I am not sure that you have the exact same problem but it looks very similar to mine and you might want to try your configuration with a wp-config.php newly generated by Wordpress.
Make a backup of your styles.css
Copy the styles.css file from twentyforteen to your theme folder.
Only change the template name at the top of the file
Re-load the themes page in WordPress admin; once you've seen it working,
Further-modify the new styles.css file as needed.
The problem could have been, that you uploaded it in .zip
Your php setting might disable the scandir. It may cause the wordpress cannot scan the theme folder
Solution:
find php.ini. You may run php --ini to get the php.ini file location.
Open php.ini,Search for disable_functions, then you may removescandir parameter.
Save and restart your php services.

Resources