Alessandro Senese aka Ceceppa
Forum Replies Created
-
Forum: Plugins
In reply to: [Ceceppa Multilingua] Function/shortcode for showing text in current languageHi,
you can use the functionCMLLanguage::get_current_slug();to retrieve current language, and print a string in according to current one.
Otherwise you can use this function:
cml_shortcode_text( array( 'fi' => '<div class='slogan'> <p class="slogan_main">Puhallus</p> <p class="slogan_sub">- tehokasta ja hellΓ€varaista</p></div>;, 'en' => 'Your text in english' ) );The plugin will chose which one display in according to current language
Forum: Plugins
In reply to: [Ceceppa Multilingua] Find the translation of a post or page by idYou can pass the parameter “lang” to get_posts to force filtering to certain language, bat if you pass on no language filtering will be applied.
In alternative you can:
$page = get_page_by_path($slug); //The following function will return an array with all translations found $translations = CMLPost::get_translations( $page->ID ); print_r( $translations );Forum: Plugins
In reply to: [Ceceppa Multilingua] URGENT: Last update made page translation impossibleHi,
pages that already had language versions now get an /en/ in the permalink instead of…
Uhm… which language is assigned to this post?
It’s just a backend bug?-pages that I already had translated still exist but are now listed as separate pages …
If you edited this page with version 1.4.34 ( the version without “Page data” box ), it’s my fault and you have to re-link it manually.
– categories both original and translations are now also listed as “originals”, so I have to redo them also.
This is very strange…never happend before…
Check if the table wp_ceceppaml_translation there are records with “cml_type = ‘S'”.In this last updates I added some “checks” to avoid translations lost. While in next major update there will be an automatic backup function on each update, that will backup all plugin data/tables.
Forum: Plugins
In reply to: [Ceceppa Multilingua] Find the translation of a post or page by idHi,
of course. You can write:/** * get the translation id, if exists, in selected language * * this function will return 0 if no translation is found. * * @param int/string $lang - language id/slug in which return translation * @param int $post_id - post id * * @return int */ CMLPost::get_translation( 'fr', $nl_id );There is also the function to retrieve all translation of a post:
CMLPost::get_translations(...)The full API documentation is available with the plugin in “Ceceppa Multilingua” -> “Api” page or on my website.
If you need something else, let me know π
Hi,
I tried to login in but with no success. I got “invalid username” error…
Can you send me login detail here: http://www.alessandrosenese.eu/contatti?PS. Reset the password because I forgot it π
I just logged in and changed the password ( this forum is public π )
Anyway I’ll try to have a look today, or at most tomorrow πForum: Plugins
In reply to: [Ceceppa Multilingua] URGENT: Last update made page translation impossibleHi,
I just fixed the “Post data” for Pages, now appears correctly…Update the plugin and let me know if the still are the issues…
Forum: Plugins
In reply to: [Ceceppa Multilingua] Default language is not being choosenI fixed the issue, please update π
Forum: Plugins
In reply to: [Ceceppa Multilingua] URGENT: Last update made page translation impossibleHi,
I just made a test on new installation and works fine for me…1. In All Posts ( or All pages ) just check that the “Enable language filtering” option is enabled.
If turned of the plugin you’re not able to set language for the post type.
This is a new feature as some user need to disable filtering on certain post types..2. Is the “Post data” box visibile on the right?
3. Did you used any option in “Settings” -> “Advanced” tab like Click here to assign “English” to existing posts and pages?
4. This is strange…
Can you enable the debug and tell me if there is error in the file wp-content/debug.log?Forum: Plugins
In reply to: [Ceceppa Multilingua] Finnish tiny flag is missingOps, I’ll do π
Anyway put you flag in( tiny version ) wp-content/uploads/ceceppaml/tiny
( small version ) wp-content/uploads/ceceppaml/smallSo you’ll not lost it on each update π
Forum: Plugins
In reply to: [Ceceppa Multilingua] missing default flagTry to uninstall the plugin by using the option in “Ceceppa Multilingua” -> Settings -> “Uninstall” tab.
And after deactivate and activate it again.Forum: Plugins
In reply to: [Ceceppa Multilingua] detected language ""Try with 1.4.34, there was a bug in language detection routine
Forum: Plugins
In reply to: [Ceceppa Multilingua] missing default flagFixed in 1.4.34, thanks for report π
Forum: Plugins
In reply to: [Ceceppa Multilingua] Blank site after installationHi,
you can use the function cml_show_flags the full documentation is available Ceceppa Multilingua -> Documentation -> Api pageForum: Plugins
In reply to: [Ceceppa Multilingua] detected language ""Please open your wp-config.php file and look up for a string like this:
define ('WPLANG', '');and after tell me which value is used as second parameter.
PS. DON’T past the whole content of the file here, just that line π