[Solved] How to convert country names from English to French with the countrycode package?


Converting to French country names is a feature (one of many) that was recently added to the countrycode package, and is in the currently available version (0.19) on CRAN

with version 0.19 or higher installed and loaded, you can convert to French country names with a command like…

countrycode(c('Germany', 'USA'), 'country.name', 'country.name.fr')

which will return…

[1] "Allemagne" "États-Unis d'Amérique"


Update 2021.08.23

(thanks to Samuel Calderon in the comments below)

as of v1.3.0, the proper syntax/destination code is:

countrycode(c('Germany', 'USA'), 'country.name', 'cldr.name.fr')

2

solved How to convert country names from English to French with the countrycode package?