Tagged: enfold, plugin, Portfolio, string, string translation, translation, WMPL
-
AuthorPosts
-
January 28, 2014 at 2:16 pm #215764
Hello there!
I’ve just installed WPML to my Enfold page (www.casanostrafilms.com) and it works well except for the String Translation. Everytime I try to install it (through wordpress plugin installer or through ftp) it doesn’t work. When I activate the plugin the page just “disappears”. It just shows me a blank page with this url.
http://www.casanostrafilms.com/wp-admin/plugins.php?activate=true&plugin_status=all&paged=1&s=
There isn’t a problem with the other WPML plugins. Any idea why this happens with string translation only?
Thanks!
Nora Soler PastorJanuary 28, 2014 at 3:14 pm #215791Hi Nora!
Please try to increase the allocated php mermory to 128M. Please see http://www.dailyblogging.org/wordpress/increase-wordpress-memory-limit/
Best regards,
YigitJanuary 30, 2014 at 11:57 am #216907Hi there!!
Thank you very much I have been able to install string translation but I can’t seem to be able to translate the “All” category in the portfolio. I can translate the other ones but not that specific category and it doesn’t appear on the string translation.
I would really appreciate some help!
Nora
January 31, 2014 at 10:58 am #217366Hi!
The “All” word is translatable with the mo/po files. I suggest to use Codestyling to translate it. Install the plugin ( http://wordpress.org/plugins/codestyling-localization/ ), go to Tools > Localization and select “Themes”. Then search for “Enfold” in the list and select your language and click the “create po-file” button. Click on “Rescan” to search for all text strings. Afterwards click on “Edit” and translate the required strings from the “avia_framework” textdomain. At least click the “create mo file” button next to the “Textdomain” selection dropdown (top left corner).
Best regards,
PeterFebruary 26, 2014 at 12:16 pm #229525Hi there!
Thank you! I tried running codestyling ( I had already used it on another theme ) but Worpdress 3.8.1 seems to have a problem with admin permits and it doesn’t let me use the plugin. So until I fix this I was wondering if there’s a php file I can modify through the editor or through uploading some modified php file in Filezilla?
Thanks!
Nora
February 26, 2014 at 3:15 pm #229578Hi!
Please go to wp-content\themes\enfold\config-templatebuilder\avia-shortcodes folder and open portfolio.php file and find
$first_item_name = apply_filters('avf_portfolio_sort_first_label', __('All','avia_framework' ), $params);
and modify it as needed
Best regards,
YigitFebruary 26, 2014 at 9:54 pm #229776Hello Ygit! I’ve modified the code from
$first_item_name = apply_filters('avf_portfolio_sort_first_label', __('All','avia_framework' ), $params);
to
$first_item_name = apply_filters('avf_portfolio_sort_first_label', __('Todo','avia_framework' ), $params);
so I uploaded it and nothing’s happening. I don’t know if I’ve changed it correctly or if something else I should change.
Help would be really appreciated!!
Nora
February 27, 2014 at 7:50 am #229950Hi!
Please use this on functions.php:
add_filter('avf_portfolio_sort_first_label', 'avf_change_portfolio_sort_first_label', 10, 1); function avf_change_portfolio_sort_first_label($first_item_name) { $first_item_name = __('Todo','avia_framework' ); return $first_item_name; }
Place it at the very bottom.
Best regards,
IsmaelFebruary 27, 2014 at 11:03 am #230012Hi Ismael
I placed this code on functions.php. I asssume it’s the php file situated under wp-content/themes/enfold/functions.php.
Like this
/* * register custom functions that are not related to the framework but necessary for the theme to run */ add_filter('avf_portfolio_sort_first_label', 'avf_change_portfolio_sort_first_label', 10, 1); function avf_change_portfolio_sort_first_label($first_item_name) { $first_item_name = __('Todo','avia_framework' ); return $first_item_name; } require_once( 'functions-enfold.php');
and also this
/* * register custom functions that are not related to the framework but necessary for the theme to run require_once( 'functions-enfold.php'); add_filter('avf_portfolio_sort_first_label', 'avf_change_portfolio_sort_first_label', 10, 1); function avf_change_portfolio_sort_first_label($first_item_name) { $first_item_name = __('Todo','avia_framework' ); return $first_item_name;}
But when I do so the web just disappears and I cannot access the admin panel or anything. Maybe I should place the code on the functions-enfold.php instead?
Thanks
March 3, 2014 at 9:18 am #231440Hi!
Maybe you can install the Codestyling plugin on a local test server (i.e. localhost) and translate the theme there? After you translated the text strings click on the “create mo file” to generate the mo file. Then go to the wp-content/themes/enfold/lang folder and upload the mo/po files from the folder to your server. The directory path to the language folder should be the same like on your local hard drive.
Cheers!
PeterMarch 3, 2014 at 1:24 pm #231502Wow this looks a bit difficult! I don’t have a local test server, I guess I would have to configure and install a MAMP but it seems like an awful lot of work for just one word.
Would it be possible to translate this by registering a string manually (or with get text), since, of course, it doesn’t appear on string translator?
Thanks!!
Nora
- This reply was modified 10 years, 8 months ago by norasp.
March 5, 2014 at 8:49 am #232596Hi!
Please try this code and insert it into the enfold/functions.php file:
add_filter('avf_portfolio_sort_first_label', 'avf_change_portfolio_sort_first_label', 10, 2); function avf_change_portfolio_sort_first_label($first_item_name, $params) { if(defined('ICL_SITEPRESS_VERSION') && defined('ICL_LANGUAGE_CODE')) { switch(ICL_LANGUAGE_CODE) { case 'en': $first_item_name = "All"; break; case 'de': $first_item_name = "Alle"; break; } } return $first_item_name; }
Then replace en and de with the language shortcuts of your translation(s) and instead of “All” and “Alle” insert the translated text.
Best regards,
Peter -
AuthorPosts
- The topic ‘WPML String Translation Issue’ is closed to new replies.