18e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project/*
2a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch * Copyright (C) 2003, 2006, 2010 Apple Inc. All rights reserved.
38e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project *
48e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * Redistribution and use in source and binary forms, with or without
58e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * modification, are permitted provided that the following conditions
68e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * are met:
78e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 1. Redistributions of source code must retain the above copyright
88e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project *    notice, this list of conditions and the following disclaimer.
98e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 2. Redistributions in binary form must reproduce the above copyright
108e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project *    notice, this list of conditions and the following disclaimer in the
118e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project *    documentation and/or other materials provided with the distribution.
128e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project *
13a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch * THE POSSIBILITY OF SUCH DAMAGE.
248e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project */
258e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
268e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#ifndef Language_h
278e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#define Language_h
288e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
29dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdoch#include <wtf/Forward.h>
308e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
31dd8bb3de4f353a81954234999f1fea748aee2ea9Ben Murdochnamespace WebCore {
328e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
33a94275402997c11dd2e778633dacf4b7e630a35dBen MurdochString defaultLanguage();
34a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochvoid overrideDefaultLanguage(const String&);
358e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
36a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch// The observer function will be called when system language changes (unless it's overridden by overrideDefaultLanguage()).
37a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochtypedef void (*LanguageChangeObserverFunction)(void* context);
38a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochvoid addLanguageChangeObserver(void* context, LanguageChangeObserverFunction);
39a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochvoid removeLanguageChangeObserver(void* context);
40a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch
41a94275402997c11dd2e778633dacf4b7e630a35dBen MurdochString platformDefaultLanguage();
42a94275402997c11dd2e778633dacf4b7e630a35dBen Murdochvoid languageDidChange();
438e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project}
448e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
458e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#endif
46