- Forum
- Products
- AJAX series
- How to translate field label of "custom fields" for multilingual website?
How to translate field label of "custom fields" for multilingual website?
- Saka
-
- Offline
- Administrator
-
9 years 1 day ago #7638
by Saka
Emir Sakic
www.sakic.net
Please see
www.sakic.net/support/faq/ajax-register/#q0
Emir Sakic
www.sakic.net
Please Log in or Create an account to join the conversation.
- baijianpeng
-
Topic Author
- Offline
- New Member
-
Less
More
- Posts: 12
- Thank you received: 0
9 years 1 day ago #7639
by baijianpeng
I know how to translate Joomla extensions, in fact, I have already translated whole language file of AJAX Register to Chinese language, but, it seems that you did not understand my question:
The question is: how to translate the field labels of "custom fields".
Those field labels are NOT in language files.
I think maybe you need to add a new option for each custom field when creating:
Language Key
For example, if I need a new custom field "School Name", I can create it as:
Field Title: School Name
Field Name: schooe_name
Field Label Lanuage Key: COM_AR_CF_21_LABEL
Field DESC Lanuage Key: COM_AR_CF_21_DESC
This language Key should be generated automatically but shown on the editing interface as "read only" value, to avoid any error by user.
You can see that the first part is the same, means "component Ajax Register Custom Field", then the number, 21, means the ID number of that custom field. Since each custom field has its unique ID, then this language Key is also unique.
Then the user can translate the field label and description via ini language file, or via the "language override" at Joomla backend.
Thank you.
The question is: how to translate the field labels of "custom fields".
Those field labels are NOT in language files.
I think maybe you need to add a new option for each custom field when creating:
Language Key
For example, if I need a new custom field "School Name", I can create it as:
Field Title: School Name
Field Name: schooe_name
Field Label Lanuage Key: COM_AR_CF_21_LABEL
Field DESC Lanuage Key: COM_AR_CF_21_DESC
This language Key should be generated automatically but shown on the editing interface as "read only" value, to avoid any error by user.
You can see that the first part is the same, means "component Ajax Register Custom Field", then the number, 21, means the ID number of that custom field. Since each custom field has its unique ID, then this language Key is also unique.
Then the user can translate the field label and description via ini language file, or via the "language override" at Joomla backend.
Thank you.
Please Log in or Create an account to join the conversation.
- Saka
-
- Offline
- Administrator
-
9 years 7 hours ago #7640
by Saka
Emir Sakic
www.sakic.net
So you haven't read the FAQ. I suggest you read it again, especially the last part!
Emir Sakic
www.sakic.net
Please Log in or Create an account to join the conversation.
- baijianpeng
-
Topic Author
- Offline
- New Member
-
Less
More
- Posts: 12
- Thank you received: 0
9 years 3 hours ago #7641
by baijianpeng
So you did not understand my question. I do NOT mean read custom field "value", I mean "translating the field label"!
Could you please build a multi-lingual website, for example, English and French or something you can read but not English, I mean two languages (or more) that can be switched by visitors on frontend, NOT just install the interface language files.
A multi-language website.
Then install Ajax Register on it. Then create a custom fields, such as "School Name".
Well, when the visitor switch the page to "French" language, how will Ajax Register show the field label "School Name"? It will show it still in English? Or in French? But where can the website Admin define the French string for this field label?
Could you please build a multi-lingual website, for example, English and French or something you can read but not English, I mean two languages (or more) that can be switched by visitors on frontend, NOT just install the interface language files.
A multi-language website.
Then install Ajax Register on it. Then create a custom fields, such as "School Name".
Well, when the visitor switch the page to "French" language, how will Ajax Register show the field label "School Name"? It will show it still in English? Or in French? But where can the website Admin define the French string for this field label?
Please Log in or Create an account to join the conversation.
- Saka
-
- Offline
- Administrator
-
8 years 11 months ago #7642
by Saka
Emir Sakic
www.sakic.net
Yes and it's explained exactly how to do it in the FAQ I linked. I don't know how to explain it better than that. Just do what it says to do there and try.
Emir Sakic
www.sakic.net
Please Log in or Create an account to join the conversation.
- baijianpeng
-
Topic Author
- Offline
- New Member
-
Less
More
- Posts: 12
- Thank you received: 0
8 years 11 months ago #7643
by baijianpeng
Ok, it seems that we can not understand each other.
To make things easier, please do help me on this issue with a real example:
Look at this registration page:
http://intl-webs.com/index.php/cn/component/users/?view=registration
This is a multi-language website. If switch to English language, the registration page is:
http://intl-webs.com/index.php/en/component/users/?view=registration
There is 3 extra fields on the registration form, all of them were created by AJAX Register:
Though you can not read Chinese, I am sure you can find them.
The problem is:
When switching to English language, the fields labels of those 3 extra fields are still in Chinese language!
How to translate those 3 labels into English?
I can give you the Super User account, you can do it yourself to show me you have already solved this issue as you mentined above.
Thank you.
I will PM you the Super User account.
To make things easier, please do help me on this issue with a real example:
Look at this registration page:
http://intl-webs.com/index.php/cn/component/users/?view=registration
This is a multi-language website. If switch to English language, the registration page is:
http://intl-webs.com/index.php/en/component/users/?view=registration
There is 3 extra fields on the registration form, all of them were created by AJAX Register:
您的公司或机构名称
电话
公司或机构网址
Though you can not read Chinese, I am sure you can find them.
The problem is:
When switching to English language, the fields labels of those 3 extra fields are still in Chinese language!
How to translate those 3 labels into English?
I can give you the Super User account, you can do it yourself to show me you have already solved this issue as you mentined above.
Thank you.
I will PM you the Super User account.
Please Log in or Create an account to join the conversation.