이 플러그인은 최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다. 워드프레스의 좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 있을 수 있습니다.

WPML Shortcodes

설명

Adds the wpml__ and wpml_e functions to your theme and the wpml__ shortcode to your WordPress website. Make your WordPress full WPML ready

<?php wpml__( $text, $context ); ?>
<?php wpml_e( $text, $context ); ?>

Similarly to the behaviour of the __, _e functions, you must provide a string to make translateable and a context.
That’s it; just provide translations from the WPML > String Translations admin panel.

Check how to use the shortcode below.

Usage (via code)

<h1><?php echo wpml__( 'Title', 'wpmlshortcodes' ); ?></h1>
<h2><?php wpml_e( 'Subtitle', 'wpmlshortcodes' ); ?></h2>

Usage (via shortcode)

<h1>[wpml__ context=wpmlshortcodes]Title[/wpml__]</h1>
<h2>[wpml__ context=wpmlshortcodes]Subtitle[/wpml__]</h2>

NEWS! WPML Translate (+ shortcode)
Adds the wpml_if (ex wpml_translate) shortcode to your WPML suite. You can also use the wpml_e__if_language( $content, $lang ) in your php code.

Usage (via code)

<p><?php
wpml_e__if_language( 'Text', 'en' );
wpml_e__if_language( 'Testo', 'it' );
?></p>

Usage (via shortcode)

[wpml_if lang='en']Text[/wpml_if][wpml_if lang='it']Testo[/wpml_if]

It also supports backward compatibility for wpml_translate and wpml_language from WPML Translate Shortcode (deprecated plugin);

WPML Translate Shortcode > WPML Shortcodes

Welcome to the new WPML Shortcodes. This plugin is the new WPML Translate Shortcode, became a full-translation suite.

Of course we still support WPML Translate Shortcode, with a new shortcode (1.2.4+): wpml_if (see usage above).
Also, we provide full backward compatibility (yes, you can still use wpml_translate or wpml_language shortcodes) on 1.2.6+.

Contribute

Pull requests on github.com.

Author: Mirco Babini, Web Developer and Mobile App Developer; WordPress Consultant.

설치

Simply search for ‘WPML Shortcodes’ in the Plugins Admin page, then install and activate. That’s it!

후기

2021년 5월 28일
Surprisingly, the plugin is still working !! And I inserted the shortcode into Revolution Slider, and it changes the language there too.
모든 5 평가 읽기

기여자 & 개발자

“WPML Shortcodes”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

자국어로 “WPML Shortcodes”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

1.2.6

  • Add backward compatibility to wpml_translate and wpml_language from WPML Translate Shortcode (deprecated plugin)

1.2.5

  • Fix docs
  • Support optional context in main api
  • Fallback on global context, api: wpml__main_context( $context )
  • Fix shortcodes
  • Refactoring

1.2.4

  • Integration: WPML Translate Shortcode (deprecated since now)
  • usage: [wpml_if lang=it]ciao[/wpml_if][wpml_if lang=en]hello[/wpml_if]

1.2.3

  • Support defined name for shortcodes

1.2.2

  • Fallback (english) if WPML is missing

1.2.1

  • Fix the J.D. Grimes issue (/pull/1)
  • Needed to manually restore all the translated strings

1.2.0

  • Ready for the marketplace