gugax
Forum Replies Created
-
@yuriinalivaiko thanks for the update. Is it possible to start using the plugin from feature/multilingual branch, or you advice to wait for it?
I also have another bug reported here (still without solution – https://www.ads-software.com/support/topic/issues-with-members-page-translations/page/2/), maybe it could be related or fixed in this new version. (If it is confirmed as a bug.)- This reply was modified 1 year, 6 months ago by gugax.
Hi @missveronicatv still same behaviour. Please note the settings i have
– 2 pages for members (1 in pt and 1 in en)
– Both pages are using same members directory form
– I’m using polylang to switch languages in my website which is being working so far for the ultimate member pages and strings except members directory form
– i wanted to avoid to create two members directory form just with 2 different languages. Even if i do, i believe it is not possible as when i tried it in members directory form settings i couldn’t find english strings as my admin is now in portuguese.
– New weird behaviour in my WP admin, not sure if it is being impacted now by this new plugin, as i desactivated and still face the issue, but now i can’t change the wp-admin page to another language. it is in portuguese.Thanks
Apologies late response but didn’t work on this last days. I have commented the line and the issue had before with the languages disappeared, but i’m still facing issue with translating the mentioned strings.
Can you keep supporting this? I completly lost hopes with this bug. Not sure how no one got this before.
Thanks
Hi @missveronicatv sorry for late response but couldn’t connect earlier.
I’ve installed the new plugin but i’m having weird behaviour in my website.
I have on my top bar the language flags to select the language. I noticed that english language disappeared from the menu, so i went back to my list of pages and i see that “Members” page that was in english version was set to portuguese version.
So i changed it back to english and did another test:
- Go to homepage (by default pt-PT language is selected)
- Go to”Members” page, the page is translated except the strings mentioned before in this ticket (i.e. issue remains).
- Select english language from the menu which by defaultr edirects me to homepage and noticed that portuguese flag disappeared (new issue).
- Go to”Members” page and i see the page is translated in portuguese even i’m using english language.
- Go to WP-Admin and click on pages and i noticed that my “Members” page that was in english is now set in portuguese automatically (new issue), meaning 2 pages members in portuguese.
- I edited the “members” page to be in english language and if i start the step from 1. all happens again.
if i disabled the plugin the two new issues don’t occur.
Workaround, almost:
So i created two “Member Directories” forms. The goal is to load one in portuguese page and another in english page (not sure if i already should have done this). With this i can manipulate the 3 strings that weren’t able to translate before as i can put the text i desired. What is the issue? For some reason the fields that i want to display to sort and search and also the remaining page is showing all the fields in portuguese. Do you know what can i do to show them in english?
@missveronicatv, please find below the logs:
Actions:
- Navigate to home page
- Login with user admin (was redirected to wp-admin)
- Navigate to page “Members”
- Search for user
- Change language to EN
- Navigate to page “Members”
- Search for user
PLL referer: PLL lang in: PLL not in Ajax or user not logged in PLL lang out: *** PLL referer: PLL lang in: PLL not in Ajax or user not logged in PLL lang out: *** PLL referer: https://localhost/mywebsite/wp-admin/ PLL lang in: pt PLL not in Ajax or user not logged in PLL lang out: pt *** PLL referer: https://localhost/mywebsite/membros/ PLL lang in: pt PLL we have a cookie, use cookie lang: pt PLL lang not in referer URL PLL use default lang: pt PLL lang out: pt *** PLL referer: https://localhost/mywebsite/membros/?search_3da9c=a PLL lang in: pt PLL we have a cookie, use cookie lang: pt PLL lang not in referer URL PLL use default lang: pt PLL lang out: pt *** PLL referer: https://localhost/mywebsite/en/members/ PLL lang in: en PLL we have a cookie, use cookie lang: en PLL use lang in referer URL PLL lang out: en *** PLL referer: https://localhost/mywebsite/en/members/?search_3da9c=a PLL lang in: en PLL we have a cookie, use cookie lang: en PLL use lang in referer URL PLL lang out: en ***
Hestia Theme (free version)
Hi @missveronicatv thank you for this. However still facing same issue.
I have the right directory structure in my child theme (otherwise logs before wouldn’t appear). I removed the code snippet from my functions.php file and isntalled plugin and still face same behaviour.Do you know if there a way to debug this? I start thinking that could be theme issue, however, not sure, as other strings from plugin are translated.
Hi @missveronicatv, same behaviour – strings are not translated.
Seems all fine to me. Please find the logs below.
With pt_PT language selected
Action: Navigate to “members” page, search for a member.
Logs:
PLL 0: pt_PT
PLL 1: pt_PT
PLL 2: pt_PT
PLL 3: https://localhost/mywebsite/membros/
PLL 0: pt_PT
PLL 1: pt_PT
PLL 2: pt_PT
PLL 3: https://localhost/mywebsite/membros/?search_3da9c=aWith en_GB language selected
Action: Navigate to “members” page, search for a member.
Logs:
PLL 0: en_GB
PLL 1: en_GB
PLL 2: pt_PT
PLL 3: https://localhost/mywebsite/en/members/
PLL 0: en_GB
PLL 1: en_GB
PLL 2: pt_PT
PLL 3: https://localhost/mywebsite/en/members/?search_3da9c=a@missveronicatv it didn’t work. I also trid to use the pll_ function (example below), but didn’t work neither. Any other ideas?
$string = pll__( ‘{total_users} Members’ );
@missveronicatv still not working for me. I’m not sure what could be the reason.
@missveronicatv I’m sorry to stay, it didn’t work neither.
There is a function in polylang that returns the selected language “pll_current_language”. Not sure if it makes sense to use this function instead to know which language is selected. (just throwing ideas)
/** * Returns the current language on frontend. * Returns the language set in admin language filter on backend ( false if set to all languages ). * * @api * @since 0.8.1 * * @param string $field Optional, the language field to return ( @see PLL_Language ), defaults to 'slug'. Pass OBJECT constant to get the language object. * @return string|PLL_Language|false The requested field for the current language. */ function pll_current_language( $field = 'slug' ) { if ( OBJECT === $field ) { return PLL()->curlang; } return isset( PLL()->curlang->$field ) ? PLL()->curlang->$field : false; }
@missveronicatv
I’m confused. WP Settings -> General is just for WordPress interface, am I right? We need to use additional plugins to have multi language website (to actually translate website contents and plugins).
In my case I’m using plugin Polylang to change my language and Loco Translate to translate ultimate-member strings. Which is working fine so far for other strings that Ultimate Member has.Hi @missveronicatv , I’ve tried what is mentioned in UM bug report, but I still see in english only (when i have different language selected).
What I did
1. I’ve added the code snippet in my “functions.php” child theme (path of file: hestia-child > functions.php)2. Created a “members-header.php” file under my child theme directory (path of file: hestia-child > ultimate-member > templates > members-header.php)
3. Confirmed that strings are translated in Loco Translate plugin for the language i want.
Not sure what to do next, can you provide some guidance? Thank you
- This reply was modified 1 year, 6 months ago by gugax.
Thank you so much @missveronicatv
I was able to make it work with your solution fix. Thank you for your time and support!