此用户没有收藏的主题。
收藏的论坛主题
创建的论坛主题
| 状态 |
主题
|
支持人员 | 参与者 | 帖子 | 最新活动 |
|---|---|---|---|---|---|
|
Making customizer content easy to translate
发起人:John 在:Chat Support |
|
0 | 2 | 3 months, 1 week前 | |
|
wpml function to display translated strings
发起人:John
在:English Support
Problem: bloginfo('name'). However, using the Site name for English and the tagline for Welsh causes issues when the Site name is translated in String Translation. add_action( 'init', function() {
do_action( 'wpml_register_single_string', 'site_settings', 'blogname_en', 'Your Site Name in English' );
do_action( 'wpml_register_single_string', 'site_settings', 'blogname_cy', 'Your Site Name in Welsh' );
});After registering the strings, you can retrieve them on the frontend with the following code: $en = apply_filters( 'wpml_translate_single_string', 'Your Site Name in English', 'site_settings', 'blogname_en' ); $cy = apply_filters( 'wpml_translate_single_string', 'Your Site Name in Welsh', 'site_settings', 'blogname_cy' ); echo esc_html( $en ) . ' ' . esc_html( $cy ); This approach ensures that both the English and Welsh names appear on the page regardless of the selected language. Please note that this solution might be irrelevant if it’s outdated or not applicable to your case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If this does not resolve your issue, please open a new support ticket. |
|
1 | 15 | 5 months前 | |
|
Translating dates into Welsh
发起人:John 在:Chat Support |
|
0 | 4 | 5 months, 2 weeks前 | |
|
WPML Import Export
发起人:John 在:Chat Support |
|
0 | 2 | 1 year前 |