Support

  1. chris-reddall
  2. Support
  3. Monday, April 09 2018, 06:03 PM
  4.  Subscribe via email
Hi there,

I have installed Japanese language and now I want to translate each field. I have followed steps in the documentation but nothing seems to be working.

---field manager---
I have a field name - Business phone
Field alias is - business_phone

----language override - Japanese -----

Constant - BUSINESS_PHONE
Text - Something in Japanese

Nothing seems to be working.

Can you please help.

Thanks
Attachments (1)
admin Accepted Answer
Admin
Hi,
sorry for late reply, it was night for us.

You should change title of field from "Business phone" to "BUSINESS_PHONE"
  1. more than a month ago
  2. Support
  3. # 1
chris-reddall Accepted Answer
Pro
Thanks a lot for your response. Field translation is working fine. Thanks for that.

One other thing - How can I keep English language when sending update notification email. If the user chooses Japanese language and update their profile at the frontend, the update notification email is sent but it sends in Japanese rather then in English.

My question is how can I load English language and send the email in English regardless what language the user has chosen at the frontend.


Thanks.
  1. more than a month ago
  2. Support
  3. # 2
admin Accepted Answer
Admin
Hi,
Easy Profile and Joomla should not send email when you update some profile. Have you other some component that manage this thing?

Anyway to make this you can simply override Japanese language string with English language text:
- Go to Extensions->Languages->Override
- Set at the left to filter for Japanese language (site)
- Click to button "New"
- In the right section search for email text (you can use only a portion of text of the Japanese email)
- When you have identified the language constant for Japanese email then you can override the text with English translation
  1. more than a month ago
  2. Support
  3. # 3
chris-reddall Accepted Answer
Pro
We have developed our own plugin that gets triggered when the user updates their profile at the front end.

The issue I am having is that any number of fields I create in EasyProfile that get displayed in two different languages - Japanese and English. The user decides the preferred language at the front end. Therefore, I have already created the translation for each field into two different languages. That's all fine.

Now the user logs into front end to update his/her profile. If the user chooses the English language that fine. The update notification email is sent to an administrator containing all updated fields translating field CONSTANT (as per your documentation) in English. This is perfectly fine. The purpose of this email is to basically let the administrator know that some user has updated the profile.

But, the user chooses Japanese language and update his/her profile, the update notification e-mail is sent to an administrator containing all updated fields translating field CONSTANT (as per your documentation) in Japanese. I do not want to use the Japanese language when sending email to the administrator. I want to use the English language.

All field CONSTANTS are created in language/override folder - one for Japanese and one for English. So the question I am asking is how can I make sure that the e-mail sent to an administrator is in English language only and not in other languages. Is there any way I can load the English language from override folder in my plugin? Or Can I provide extra params with Jtext::() helper to get the CONSTANT value from the English language in override folder?

Thanks. Looking forward to hearing from you.
  1. more than a month ago
  2. Support
  3. # 4
admin Accepted Answer
Admin
mmh...I'm not sure, but you can try something like this at start of function:
$lang =JFactory::getLanguage();
$lang->setLanguage( 'en-GB' ); // or maybe 'en' because is possible that it need language code instead language tag
$lang->load();
  1. more than a month ago
  2. Support
  3. # 5
chris-reddall Accepted Answer
Pro
This doesn't change the language in a plugin - it only changes the metadata

----
[metadata:protected] => Array
(
[name] => English (en-GB)
[nativeName] => English (United Kingdom)
[tag] => en-GB
[rtl] => 0
[locale] => en_GB.utf8, en_GB.UTF-8, en_GB, eng_GB, en, english, english-uk, uk, gbr, britain, england, great britain, uk, united kingdom, united-kingdom
[firstDay] => 0
[weekEnd] => 0,6
[calendar] => gregorian
)
-----

But the language remains the same. The meaning plugin still uses the language that was chosen by the user at the front end.

Plugin get triggered when -

//file plugins/system/jsn_system
if($changed){
//trigger jsn update notification plugin - simple email
//trigger our custom plugin update notification - email to an admin with list of updated fields
}
  1. more than a month ago
  2. Support
  3. # 6
admin Accepted Answer
Admin
Hi,
sorry but I don't know I to make this, this is not something related to Easy Profile.

Anyway I found this: https://stackoverflow.com/questions/33438839/set-language-for-jtext?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

so it could be:
$lang = JLanguage::getInstance( 'en-GB' );
and replace all occurrences of JText::_( 'TRANSLATE_STRING' ); with $lang->_( 'TRANSLATE_STRING' );
  1. more than a month ago
  2. Support
  3. # 7
chris-reddall Accepted Answer
Pro
Thanks a lot for your support. This has worked.

Thanks a lot.:D
  1. more than a month ago
  2. Support
  3. # 8
  • 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

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.