--[[----------------------------------------------------------------------------

WFLocalizationUtils.lua

--------------------------------------------------------------------------------

ADOBE CONFIDENTIAL
------------------
Copyright 2013 Adobe Systems Incorporated
All Rights Reserved.

NOTICE: All information contained herein is, and remain the property of
Adobe Systems Incorporated and its suppliers, if any. The intellectual and
technical concepts contained herein are proprietary to Adobe Systems
Incorporated and its suppliers and may be covered by U.S. and Foreign
Patents, patents in process, and are protected by trade secret or copyright
law.  Dissemination of this information or reproduction of this material is
strictly forbidden unless prior written permission is obtained from
Adobe Systems Incorporated.

------------------------------------------------------------------------------]]

	-- core.os
local WFLocalizationUtilsImp = require 'WFLocalizationUtilsImp'

--============================================================================--

-- @mark WFLocalizationUtils namespace

--[[!

\class WFLocalizationUtils

\brief This namespace provides utilities that help you localize an application's
	user interface.

]]--


local WFLocalizationUtils = {}

--------------------------------------------------------------------------------
--[[!
	Retrieves the language code for the current locale. For example,
	for the locale en_US, the language code is "en".

	\return (string) The language code.
]]--

function WFLocalizationUtils.getLanguageCode( )
	-- WFArguments.check( )
	-- This wrapper exists only for documentation purposes; real implementation
	-- comes from native code (see "Real implementation" below).
end

--------------------------------------------------------------------------------
--[[!
	Retrieves the region code for the current locale. For example,
	for the locale en_US, the language code is "US".
	
	\return (string) The region code.
]]--

function WFLocalizationUtils.getRegionCode( )
	-- WFArguments.check( )
	-- This wrapper exists only for documentation purposes; real implementation
	-- comes from native code (see "Real implementation" below).
end

--------------------------------------------------------------------------------
--[[!
	Retrieves the current locale. For example, "en_US".
	
	\return (string) The locale ID.
]]--

function WFLocalizationUtils.getLocaleId( )
	-- WFArguments.check( )
	-- This wrapper exists only for documentation purposes; real implementation
	-- comes from native code (see "Real implementation" below).
end

--------------------------------------------------------------------------------
--[[!
	Returns whether the current locale uses the Metric system

	\return (boolean) true if metric (meters, kilometers) false if standard
	english (feet, miles).
--]]
function WFLocalizationUtils.useMetric()
	-- WFArguments.check()
	-- This is a fallback implementation if useMetric is not explicitly provided
	-- by native code

	return WFLocalizationUtils.getRegionCode() ~= 'US'
end

--==============================================================================
-- @mark The Real implementation
--==============================================================================

for k,v in pairs( WFLocalizationUtilsImp ) do
	WFLocalizationUtils[ k ] = v
end

--==============================================================================

return WFLocalizationUtils
