Method: Middleman::CoreExtensions::Internationalization#path_root
- Defined in:
- lib/middleman-core/core_extensions/i18n.rb
#path_root(locale) ⇒ Object
213 214 215 216 217 218 219 220 |
# File 'lib/middleman-core/core_extensions/i18n.rb', line 213 def path_root(locale) if ([:mount_at_root] == locale) || ([:mount_at_root].nil? && locales[0] == locale) '/' else replacement = [:locale_map][locale] || locale [:path].sub(':locale', replacement.to_s).sub(':lang', replacement.to_s) # Backward compat end end |