Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/65.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 地理编码器gem的国家/地区代码列表_Ruby On Rails_Ruby On Rails 3_Rails Geocoder - Fatal编程技术网

Ruby on rails 地理编码器gem的国家/地区代码列表

Ruby on rails 地理编码器gem的国家/地区代码列表,ruby-on-rails,ruby-on-rails-3,rails-geocoder,Ruby On Rails,Ruby On Rails 3,Rails Geocoder,我正在使用检测国家/地区用户 在我的应用程序中,我需要检测国家/地区用户。我做了一些类似于: c = request.location.country_code case c when 'US' I18n.locale = :en when 'ES' I18n.locale = :es else locale ||= I18n.default_locale end 我的问题是在哪里可以找到我的其他语言的国家代码列表?检查您正在使用

我正在使用检测国家/地区用户

在我的应用程序中,我需要检测国家/地区用户。我做了一些类似于:

c = request.location.country_code
  case c
    when 'US'
     I18n.locale = :en
    when 'ES'
     I18n.locale = :es
    else
     locale ||= I18n.default_locale
   end

我的问题是在哪里可以找到我的其他语言的
国家代码列表?

检查您正在使用的提供商的文档。例如,Google返回ISO 3166-1代码


问候

上面列出的表格不再可用

请看这个以供参考