Quantcast
Channel: polylang – WordPress.org Forums
Viewing all articles
Browse latest Browse all 11471

miguelcortereal on "Polylang and Pitch theme"

$
0
0

Pitch theme settings has fields to configure some default texts.

These fields are in an array from a record with option_name "pitch_theme_settings at wp_options table.

To get translation for some of these fields I've included them at wpml-config.xml file as shown below (I'm getting translation for a plugin too and works fine):

<wpml-config>
	<admin-texts>
		<key name="wp_cart_title" />
		<key name="wp_cart_empty_text" />
		<key name="wp_cart_visit_shop_text" />
		<key name="plural_items_text" />
		<key name="singular_items_text" />
		<key name="shipping_text" />
		<key name="item_name_text" />
		<key name="price_text" />
		<key name="remove_text" />
		<key name="item_qty_string" />
		<key name="no_item_in_cart_string" />
		<key name="pitch_theme_settings">
			<key name="front_page_cta_text" />
			<key name="front_page_cta_button_text" />
		       <keyname="front_page_home_title_latest_projects" />
			<key name="front_page_home_title_blog" />
			<key name="front_page_home_title_clients" />
			<key name="project_archive_title" />
			<key name="project_view_text" />
			<key name="text_footer_text" />
			<key name="text_search_placeholder" />
			<key name="text_comments_closed" />
			<key name="text_not_found" />
		</key>
	</admin-texts>
</wpml-config>

For some reason these theme settings doesn't show at polylang settings for translation.

From what I could understand this is dependent from get_option function to work.

I've been looking for get_option function in my theme associated with 'pitch_theme_settings' record and this is all I could find at functions/settings.php file:

$original = (array) get_option('pitch_theme_settings', array());
	if(isset($original['search_input'])){ .... and so on ....

If I'm right (I'm not a coder, I'm only learning to look at it), Pitch theme use another process to retrieve the information from wp_options table different from get_option function.

Do I have alternatives?

http://wordpress.org/extend/plugins/polylang/


Viewing all articles
Browse latest Browse all 11471

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>