I'm currently developping the website of my company, which is located in France.I always pay attention to giving explicit generic english names to my variables. For obvious reasons, and of course, in order to be able to ship the same code over other countries one day.For instance I called french Rgions and Dpartements (which are subdivisions of the country), Area and Subarea. I called companies SIRET number, company_identifier.However, sometimes there are things very specific to the french legislation. For instance, I need to store the fact that someone benefits from something called CPF (Compte Personnel de Formation) in France, but that probably have no equivalent in other countries.I wonder how I should store this variable, how I should name it. And how to handle this when deploying the website in other countries.My question is very general (hopefully not too much), the CPF example is just... an example.Another good example is when you want to store the civility of a person. In France, we have Monsieur, Madame and we used to have Mademoiselle. AFAIK, in UK, there is Mr, Mrs, Ms and Miss. And other countries have different ways to greet a person according to his gender and social status. Currently, I just store the gender and link it to ugettext(Monsieur) or ugettext(Madame) when I want to greet a person according to his gender. But I have no idea how I will handle this when I will have to ship my website in another country where this behavior is not accurate (and might offend).
How do you handle country specific behaviors?
internationalization
There are too many country-specific issues so in my opinion you cannot handle them in advance.What I do if I update the code for a new country is to add the ticket number as a comment to the source code so I can easily find all changes that belong to the Italian version by searching for the ticket number. Behavioral changes like Adress line calculation, Tax-calculation are implemented in a country specific module that share the same Java interface. TaxCalculation is implemented as TaxCalculationDe, TaxCalculationIt, TaxCalculationFr ...It gets even more complicated if you have countries with more than one language (i.e. Switzerland or Canada).if countries have different taxes per region (i.e. Italy with Vatican City and San Marino).if countries have more than one timezone (i.e. the U.S.)