Wordpress theme language - php

I have a site on wordpress using the subway theme, and most of the site is in Spanish, but I can't figure out how to change the language of the abbreviation of the months on "recent posts", I tried the wp-includes/locale.php that has those instructions to assign the abbreviations to the full word, but it doesn't change anything. What am I missing? or is it another file I have to change?

Dont touch the Core!
To localize plugins or themes, check out the Codex: http://codex.wordpress.org/I18n_for_WordPress_Developers

Related

Loco Translate not shows all translations

I am using Loco Translate to translate wordpress and woocommerce. Great plugin, but unfortunately some string translations are not visible/working on the frontend at the checkout page and cart. Could this be a child team problem?
Strings are know in Loco Translate and correctly translated, they are only not showing up at frontend.
Translation String issues:
Have a coupon? Click here to enter your code.
Flat rate:
Subscribe to our newsletter
Site www.narwal.shop/checkout
Help is appreciated.
Go to wp-content and uploads directory. create a new directory and name it as same as the plugin name. then create a new directory and name it languages.
now upload your .po and .mo files in it.
the problem is solved!
Force WP to load the language file from languages/loco/themes/.. directory, like this inside functions.php:
add_action ( 'wp', 'load_translations' );
function load_translations() {
load_theme_textdomain( 'theme-name-here' );
}
Update: you should contact the creator of the (child) theme.
Every single component that displays text (i.e.: almost all of them), including themes and plugins, need to have included multilingual support for it to work.
Woocommerce does it, but you might have other components that do not. If you have a custom theme, that would be the first thing I'd check.
Unfortunately, if this is the case there is nothing you can do about it other than not use it, accept that that part of the site will not be translated or ask the developer who made them to put in the extra work to add multilingual support.
See also: https://localise.biz/wordpress/plugin/child-themes
In my case it was a wordpress language problem. I resolved this by changing it from English to my target translation language. To achive this in your wordpress panel go to: Settings -> General -> find language and change it.

How do you translate "posted on","by" and "continue reading" on Wordpress blog posts to another language?

I have a basic WordPress theme based on underscores by automatic. The theme's default language is in Norwegian, but I still have "posted on", "by" & "continue reading" under posts displaying in English. What's the proper way to translate this?
I have looked through functions.php and can't see anything in this regard.
TIA, Martin
You didn't do the translation in a proper way. What you did is called string replacement, not the translation. The proper way of translation is to make a language_code.po and language_code.mo file using software like PoEdit :)
I've added some links below for your convenience.
WordPress Localization
Multilingual WordPress
WordPress i18n
PoEdit
Found it :)
You edit this on template-tags.php which is required on functions.php

Fails to change the language of a WP site

I'm building a WP site for a Spanish company, and I want to change the language of the site (not the admin area's language).
All the posts and the things that I put in the site are in Spanish, since I created them, but the default texts of the theme are in English (for instance, the string "search" inside the search box).
When I'm trying to change the language through Settings -> General -> Site language to "EspaƱol", it changes. But after I refresh the page it returns to "en_US" again, and in the bottom it says:
Note: The WPLANG constant in your wp-config.php file is no longer needed.
I did change the WPLANG in wp-confing.php to define('WPLANG','es_ES'), doesn't seem to help.
I am not sure if you have put the language files in the right place.
So, first you need to download spanish language files, you can find here
and then put them into /wp-content/langauges folder, if no, create it.
you can find full tutorial here
First, you have to download spanish version.
All files of wordpress system will translate to Spanish, BUT, some words of your current theme installed maybe are in english, you'll translate it.
In search.php you will find the input box, where you will change the word "Search.." this are in Apparence (Apariencia) -> Editor (Editor)
First, make sure the theme you are using is multi-language.
If no:
You need to translate the theme files located in wp-content/themes/
-EDIT:
You need to download the correct theme to your computer and manually edit the files within the theme folder, then upload it again.
Basically just go trough the theme code and replace the english text you see, for example "next post"/"previous post" to the correct sentence in Spanish in your case.
Just make sure to not edit anything you don't understand :)
Give me a shout if you need more help :)

how to make multi language site in wordpress

I wanted to make a wordpress website in 2 languages. English and Arabic. I wanted to make pages, categories and menus in 2 languages when user select English only English pages will shown to the user and when select Arabic only Arabic pages,categories and menus will be shown. ONLY Posts will remain the same for both. Every thing except posts will be changed user user.
You can do the following:
Get the the language pack (e.g. de_DE.mo) from wordpress.org. If the language pack isn't available as a standalone download, you could also use the .mo file which is bundled in the WordPress ZIP-file for your language. Located under wp-content/languages.
Move the .mo file to wp-content/languages/ of your default (english) WordPress installation.
Change the WPLANG constant in wp-config.php to the new locale (e.g. de_DE)
In your functions.php add the following filter:
functions.php
add_filter('locale', 'wpse27056_setLocale');
function wpse27056_setLocale($locale) {
if ( is_admin() ) {
return 'en_US';
}
return $locale;
}
Reference - https://wordpress.stackexchange.com/questions/27056/different-language-for-frontend-and-backend
Take a look at WordPress Codex - Translating WordPress
Additionally you can use WP plugins especially for translating your WP website:
Codestyling Localization
User Language Switch
Have a look about for a plugin that would do this for you.
I would say WPML plugin would be prefect for what you are trying to do, but this is a premium plugin and costs http://wpml.org .
hi M Usman Tahir i already work on 3 website that has multilangauge
follow the to see www.decidact.com
this website is in 5 language
1)download polylang plugind for your post content
2)downlaod codingstylelocalization for caption tranlsation

How to translate the post/page content of a theme

I am working on a site in which I have to give the option of 3 languages on the front page.
I searched a lot and was successful in translating the theme using .pot files but it is translating only the default strings of Wordpress.
I want to translate the post/page contents too which we are adding from wp-admin.
I don't want to do it with any Google translator or sidebar plugin. I want to offer this option in the index page.
Any help will be welcome.
Consider using i18n plugins such as qTranslate

Categories