Closed (duplicate)
Project:
Countries
Version:
7.x-2.0
Component:
Countries I18n
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
14 Oct 2012 at 14:32 UTC
Updated:
13 Aug 2018 at 19:27 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
fraweg commentedHello,
I am interested in such a feature too. There should be a list witch can be imported. So after that not every user should have the work to translate it. With many people this list can be final quick...
Best regards
Frank
Comment #2
nlambert commentedI haven't looked into the subject, but I did notice that countries implements hook_feeds_processor_targets_alter.
I can only imagine that feeds must be the foreseen solution.
Comment #3
drzraf commentedIn #1843958: countries i18n database I talk about a free database I found.
In #1843996: snippet to convert text field to country field I provided a snippet to parse these (simple) YAML files (using pecl-syck).
So now what's left is:
related: #1830198: Better support for various providers of Country data. (let's close one of them ?)
Comment #4
drzraf commentedI'm in favor of direct DB use because people may have several languages.
Each one needs uploading a po-file what could be painful, especially since no drush command exists today for that job.
Comment #5
attisanI'm still wondering why this all is necessary. to my understanding and knowledge all the country names are already translated in the according core language .po file.
however, installing countries module still leaves out the opportunity to simply grab all those present translations and instead asks for his own set of translations? this might be due to the veeeery obscure way drupal7 handles translations (using some sort of context - which, at least, I'm unable to put to some sort of use) but it feels clunky none the less.
still worse, after installing countries module other translations regarding country names seem to fail all together, simply showing the native form no matter my language choice. (after uninstalling countries / countries translation the translations came back).
perhaps it would be better to have some way of entity translating (using the power of entity translation) each country and not to use the legacy i18n module.
greets
ps.: this module IS very useful - as long as one isn't using a multilingual webpage.
Comment #6
alan d. commentedWorking on a better solution in #1830198: Better support for various providers of Country data.
Comment #7
estebant commentedThis is the procedure I followed:
* Go to: Configuration » Regional and language » Translate interface » Export
Select the Language you want, and "Text group": Countries
* You will obtain a "template" of the .po file, with all the names of the countries ready to be translated.
Then manually translate them. For me the field "name" was enough, ignoring the "official_name", and only those countries whose name in English is different from the name of the desired language.
You can get the translations of the countries names, for example here:
https://github.com/onomojo/i18n-country-translations/tree/master/rails/l...
where you also have the country codes, that may be useful if you are not familiar with the language you want to translate.
* Once you have the .po ready, go to: Configuration » Regional and language » Translate interface » Import
Select the file, the language, and "Text group": Countries
* Now you have the strings stored in the database.
By the way, it would be really interesting to have a repository where the people can leave their own .po files, to avoid everybody has to do the above steps.
I attach the files I created for Spanish and for Vietnamese languages, they may be useful for somebody.
1) To show the translated string of the field in the View mode, you must select Format = "Default translated" in the Manage display section of the content type.
2) To show the translated value in the dropdown list when creating/editing the content, you can apply this patch in countries.fields.inc
Comment #8
dpico commented@estebant Thank you very much for sharing your solution and your .po files! I can't download the Spanish .po file, that would save me a fair amount of time to generate. I can't download it, though. I get a "You don't have permission to access /files/issues/countries-names.es_.po on this server." error. Would you upload them again, please? I wonder why I'm not having the permissions. I'm a registered user, etc.
Comment #9
estebant commentedHola David,
I upload it again, if you have any problem, send me an email to estebantejedor@yahoo.es
Comment #10
alan d. commentedmaybe upload as iso2.txt?
Comment #11
estebant commentedThere we go
Comment #12
alan d. commentedThat one works. So strange. The po extension must not be trusted :(
Thanks!
Comment #13
estebant commentedGood :)
Comment #14
sano commentedpo file for Slovakia - only "familiar" names of countries are listed.
Comment #15
sano commentedHmm, as per above, .po files must be uploaded with a different extension. Here is the Slovakia file zipped.