[SOLVED] state dropdown

13 years 8 months ago #140994 by nicophp
Replied by nicophp on topic Re:[SOLVED] state dropdown

If you wanted to make sure the two fields are exactly in sync (i.e. your "state" field matches the "invoice state" field) then simply open the following file:
components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/xml/edit.front.invoice.xml
Copy the list of states from this file, then amend your "state" field to be a "select" field and ensure that you add all the states found in the xml file as options in your state field.


Great but in my case it's the country which is causing problems because for French and Spanish languages, I had to create drop-down countries lists in their language, which is for sure not recognized by the edit.front.invoice.xml and giving a "-".

Seems that part of CBSubs is not providing a real multilingual interface other than starting editing a huge unique edit.front.invoice.xml with all languages.

Any idea on how to make it more user friendly?

Please Log in to join the conversation.

13 years 8 months ago #141013 by beat
Replied by beat on topic Re:[SOLVED] state dropdown
Keep country language English, and use CB translations to localize country names.

That way, the stored country will still match, and using CBSubs translations, will also display right on the invoice address :)

CBSubs 1.1 will be improving this part too.

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

13 years 8 months ago #141171 by nicophp
Replied by nicophp on topic Re:[SOLVED] state dropdown
Thanks for the answer, I just finished a hard work:
1- extract the country list from edit.front.invoice.xml
2- populate an english country drop-down field
3- find all the Spanish and french translations
4- append the Spanish and french translations in the CB language files
5- append the Spanish and french translations in the CBSubs language files, that unfortunately don't have the same structure as the CB language files

Note: I had to modify the edit.front.invoice.xml, because, for instance, Ivory Coast (Côte d'Ivoire)is not in the right format for the CB language files, due to the '

For info, i'm working with CBSubs 1.1.0rc2

Please Log in to join the conversation.

13 years 8 months ago #141590 by darb
Replied by darb on topic Re:[SOLVED] state dropdown
Great nicophp!

Please tell us how you did.?

But core team why not implement the correct structure already from the beginning with dynamic update fields support for a country, region/states, cities csv file? ?

Using free world wide country/city from Maxmid? www.maxmind.com/app/worldcities

(or download.geonames.org/export/dump/ or
www.2010census.biz/geo/www/tiger/zip1999.html)

Please Log in to join the conversation.

13 years 8 months ago #142011 by nicophp
Replied by nicophp on topic Re:[SOLVED] state dropdown
Ok it was quite a long process but, as I'm used to document my work in case of having to repeat it later or to help others, now it's easier.

For this integration, read the attached file explaining everything up to the detailed creation of each file

Attachment How_to_populate_a_drop_down_CB_Field_with_a_Country_List___UPDATED.txt not found



And as, in that file I'm making reference to one of my older post, for populating a country table, here is my doc

Attachment How_to_populate_a_drop_down_CB_Field_with_a_Country_List___UPDATED.txt not found



If somebody needs the multilanguage country file and the translations for EN, ES and FR, just say it.

About Maxmind and other similars, you are right and I'm using them for a much complexer work of cascading dropdown country/state/city in the Fabrik framework.

Post edited by: nicophp, at: 2010/09/14 14:21
Attachments:
The following user(s) said Thank You: ricco1

Please Log in to join the conversation.

13 years 8 months ago #142013 by nicophp
Replied by nicophp on topic Re:[SOLVED] state dropdown
Well, the system has loaded twice the same file. So here is the first one for the integration CB/CBSubs invoices languages

Attachment Language_integration_CB_CBSubs_Invoice.txt not found

Attachments:

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.234 seconds