Fixed jquery json language extraction and updated to the latest Twine #5
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ module Twine
|
|||
}
|
||||
|
||||
# Regional dialect fallbacks to generic language (for example: 'es-MX' to 'es' instead of default 'en').
|
||||
if language.match(/([a-zA-Z])-[a-zA-Z]+/)
|
||||
if language.match(/([a-zA-Z]{2})-[a-zA-Z]+/)
|
||||
generic_language = language.gsub(/([a-zA-Z])-[a-zA-Z]+/, '\1')
|
||||
end
|
||||
|
||||
|
|
Reference in a new issue