• I went to Rencontre->Profile and added new values to My Portrait and My Search. I added them for three languages en, fr and de.

    The new value was a Single Choice List (select).

    For the new value, I added three entries – one for en, fr and de. For the New Item, one of the new items was stuck at “TO BE CHANGED”.

    I had to go into the MySQL database directly to alter this to what I wanted.

    Now I guess the Rencontre user-interface allows you to enter the ITEM in many different languages, because the ITEM is dynamic and so cannot be translated using the .po and .mo files.

    However the ITEM and Value are stuck in the English version despite changing the PolyLang language switcher from en to fr to de.

    OK, I don’t need to add a custom ITEM and VALUE to the Portrait and Search just yet and I suppose them being stuck in English is not even that big a problem.

    But the ability to add custom fields to the Profile is a powerful feature.

    Having to go into the database to alter the “TO BE CHANGED” thing made this a little puzzle to solve.

    This is a very powerful and useful feature. It would be nice there were instructions somewhere on how to make this work.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Marisa

    (@marisa2023)

    UPDATE

    I figured out how to add items and values to the Profile without using MySQL Update statements. I have now worked out how to use the Rencontre user interface. I successfully added new Items and Values to the Profile and added the new Item/Value to search using Rencontre->Custom->Search->Add Profile Element Into Search.

    But despite using the PolyLang language switcher to change the language from en to fr and then to de, the custom Profile Item/Value stays stuck in English.

    Plugin Author Jacques Malgrange

    (@sojahu)

    Hi,

    Polylang only affects the front-office part of the site. The reference language for the profiles is the WordPress language of the ADMIN part. You can change it in Settings > General.

    Regards

    Thread Starter Marisa

    (@marisa2023)

    Hello Jacques

    Thank you for replying to my posts here.

    However there is a real problem here, not just my misunderstanding.

    In fact all Profile elements are not translated, not just new, custom ones I have added.

    Under EDIT MY PROFILE->My Portrait and My Personality and My Preferences, I see all the elements such as a Marital Status, Job, My hobby, Reading etc. and not translated when I switch from en to fr using the PolyLang language switcher. Now My Portrait should get translated into French, because the Rencontre user interface has all the translations in there already under Settings->Profile.

    I have changed the country selected by default from United States to France and still the My Portrait and My Personality and My Preferences are stuck in English.

    Thread Starter Marisa

    (@marisa2023)

    There really is a problem here, because when I use the PolyLang language switcher to change from en to fr, all the Rencontre user interface changes from English to French, except My Preferences, My Personality and My Portrait and My Search. This is because their translations are set dynamically using data stored in the MySQL database and altered / viewed using Rencontre->Profile. The French translations for My Portrait etc. already exist in the MySQL database.

    Thread Starter Marisa

    (@marisa2023)

    OK, I’ve found what the problem is now! I wonder if I find a hook for the PolyLang language switcher i.e. can add some code that fires when the language is change, I could fix this myself.

    Thread Starter Marisa

    (@marisa2023)

    The problem is Rencontre reads the value of the lang cookie to work out what to display for the My Portrait language. The PolyLang language switcher does not set the value of the lang cookie. So I set the lang cookie to fr-FR and My Portrait switches. However this does not fix the problem, because the full Search functionality does not work when I try to search on the new custom Profile item/value I added. Search did work before I set the lang cookie.

    • This reply was modified 1 year, 7 months ago by Marisa.
    Thread Starter Marisa

    (@marisa2023)

    OK, search does work for a custom profile item/value. But I had to go into the users’ profiles again and re-save the My Portrait/My Search fields. Possibly the profile are somehow saved to the database in a language dependent way, but I don’t know as I’ve only done quick testing.

    Thread Starter Marisa

    (@marisa2023)

    Final Post

    So long as the right cookie is set, everything seems to work. Rencontre is perfect the way it is! Sorry for the initial post.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘adding custom fields to the profile’ is closed to new replies.