Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(971)

Unified Diff: ios/web_view/public/cwv_translation_language.h

Issue 2839093002: Implemented new Translate API for purely Objective-C clients. (Closed)
Patch Set: Added some error handling. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ios/web_view/public/cwv_translation_language.h
diff --git a/ios/web_view/public/cwv_translation_language.h b/ios/web_view/public/cwv_translation_language.h
new file mode 100644
index 0000000000000000000000000000000000000000..e60281584616a78487f3c51aa2d98aece92d1db8
--- /dev/null
+++ b/ios/web_view/public/cwv_translation_language.h
@@ -0,0 +1,25 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_WEB_VIEW_PUBLIC_CWV_TRANSLATION_LANGUAGE_H
+#define IOS_WEB_VIEW_PUBLIC_CWV_TRANSLATION_LANGUAGE_H
+
+#import <ChromeWebView/cwv_export.h>
+#import <Foundation/Foundation.h>
+
+// Represents a single translatable language.
+CWV_EXPORT
+@interface CWVTranslationLanguage : NSObject
+
+- (instancetype)init NS_UNAVAILABLE;
+
+// The ISO language code. en for English, es for Spanish, etc...
Hiroshi Ichikawa 2017/04/26 08:40:57 Can you add a link to https://cloud.google.com/tra
jzw1 2017/04/27 04:54:02 Done.
+@property(nonatomic, copy, readonly) NSString* languageCode;
+
+// The language name in the current OS locale.
Eugene But (OOO till 7-30) 2017/04/26 20:15:31 How about "Localized language name"?
jzw1 2017/04/27 04:54:02 Done.
Eugene But (OOO till 7-30) 2017/04/27 13:08:08 I think "The language name in the current OS local
jzw1 2017/04/28 02:34:53 I think what you are saying is you prefer localize
Hiroshi Ichikawa 2017/04/28 02:49:51 I believe Eugene is talking about the comment, not
Eugene But (OOO till 7-30) 2017/04/28 03:07:28 No. My comment is related to "The language name in
jzw1 2017/04/28 05:43:35 ahh ok sorry for understanding. ill update the com
+@property(nonatomic, copy, readonly) NSString* languageName;
+
+@end
+
+#endif // IOS_WEB_VIEW_PUBLIC_CWV_TRANSLATION_LANGUAGE_H

Powered by Google App Engine
This is Rietveld 408576698