Support

  1. hooman52
  2. Support
  3. Monday, June 08 2020, 07:30 PM
Hi.
I try to use jsn in multi lingual website. I need some different fields for different languages for example "department name" as a text type field for English and " Departman" for Azeri language. I googled and find this code in support:
https://www.easy-profile.com/support/about-the-multilanguage-content-display-not-the-fields-translate-overide.html#reply-14739
$this->excludeFromProfile[]='jform[field_chinese_alias1]';
I changed alias, but it doesn't work for me.
Let me ask you help me to solve this issue.
thanks
Accepted Answer
admin Accepted Answer
Admin
Hi,
yes, you should use a syntax like:
$this->excludeFromProfile[]='jform[education_az][]';
add "[]" at the end
  1. more than a month ago
  2. Support
  3. # Permalink
admin Accepted Answer
Admin
Hi,
from your explanation seems that you does not need the solution in the reply at https://www.easy-profile.com/support/about-the-multilanguage-content-display-not-the-fields-translate-overide.html#reply-14739 (in this reply the customer need to have differents fields for each language and not only a different title)

Probably in your case you need only to use a Joomla language constant for the field title, see docs at http://docs.easy-profile.com/index.php/article/translate-fields
  1. more than a month ago
  2. Support
  3. # 1
hooman52 Accepted Answer
Pro
Hi,
It seems that I cannot describe it in detail. Actually I need separate fields and label doesn't solve my issue. Imagine I have a field for "Education" of a Doctor. I need to write some text in Azeri language about doctor's education and some other text in English language about same Doctor's education. So it needs to be different content in different text type fields ( or textarea type of course).
So i think changing label for one field is not solve my issue.
Do you suggest other way ?
I tried to create "education_az" alias of a text field and "education_en" for another text field. So I can put appropriate text in each language. but, both of them are seen in profile page. One solution is hiding fields by css classes. but I don't want this way.
Thanks.
  1. more than a month ago
  2. Support
  3. # 2
admin Accepted Answer
Admin
ok, now I have understand....sorry :D

The code like this should works:
$lang = JFactory::getLanguage()->getTag();
if($lang == 'en-GB') {
$this->excludeFromProfile[]='jform[education_az]';
}
else {
$this->excludeFromProfile[]='jform[education_en]';
}
  1. more than a month ago
  2. Support
  3. # 3
hooman52 Accepted Answer
Pro
Hi,
It works fine except in one field type of select with multiple selection enabled.
is it any way to solve it too?
thanks
  1. more than a month ago
  2. Support
  3. # 4
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Request Support

Support is currently Offline

Support Availability

Working days: Monday to Friday. The support staff is not available on weekends; in the most of cases tickets will not be answered during that time.

Reply time: Depending on the complexity of your support issue it's usually between a few minutes and 24 hours for paid members and about one week for free members. When we expect longer delays we will notify you.

Guidelines

Before you post: read the documentation and search the forums for an answer to your question.

When you post: include Site Details if you request a support (you can use the form below the reply in Site Details tab).

Auto Solved Question: If after a week the author of the post does not reply to a request by moderator, the question will be marked as resolved.

Language: only English

Search Users

Easy Profile® is not affiliated with or endorsed by Open Source Matters or the Joomla Project. Joomla is Free Software released under the GNU/GPL License.