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

Side by Side Diff: app/l10n_util.h

Issue 174043: Gtk languages options page part 1: accept-languages configuration. (Closed)
Patch Set: rebase Created 11 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | app/l10n_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file contains utility functions for dealing with localized 5 // This file contains utility functions for dealing with localized
6 // content. 6 // content.
7 7
8 #ifndef APP_L10N_UTIL_H_ 8 #ifndef APP_L10N_UTIL_H_
9 #define APP_L10N_UTIL_H_ 9 #define APP_L10N_UTIL_H_
10 10
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 395
396 // In place sorting of strings using collation rules for |locale|. 396 // In place sorting of strings using collation rules for |locale|.
397 // TODO(port): this should take string16. 397 // TODO(port): this should take string16.
398 void SortStrings(const std::string& locale, 398 void SortStrings(const std::string& locale,
399 std::vector<std::wstring>* strings); 399 std::vector<std::wstring>* strings);
400 400
401 // Returns a vector of available locale codes. E.g., a vector containing 401 // Returns a vector of available locale codes. E.g., a vector containing
402 // en-US, es, fr, fi, pt-PT, pt-BR, etc. 402 // en-US, es, fr, fi, pt-PT, pt-BR, etc.
403 const std::vector<std::string>& GetAvailableLocales(); 403 const std::vector<std::string>& GetAvailableLocales();
404 404
405 // Returns a vector of locale codes usable for accept-languages.
406 void GetAcceptLanguagesForLocale(const std::string& display_locale,
407 std::vector<std::string>* locale_codes);
408
405 // A simple wrapper class for the bidirectional iterator of ICU. 409 // A simple wrapper class for the bidirectional iterator of ICU.
406 // This class uses the bidirectional iterator of ICU to split a line of 410 // This class uses the bidirectional iterator of ICU to split a line of
407 // bidirectional texts into visual runs in its display order. 411 // bidirectional texts into visual runs in its display order.
408 class BiDiLineIterator { 412 class BiDiLineIterator {
409 public: 413 public:
410 BiDiLineIterator() : bidi_(NULL) { } 414 BiDiLineIterator() : bidi_(NULL) { }
411 ~BiDiLineIterator(); 415 ~BiDiLineIterator();
412 416
413 // Initializes the bidirectional iterator with the specified text. Returns 417 // Initializes the bidirectional iterator with the specified text. Returns
414 // whether initialization succeeded. 418 // whether initialization succeeded.
(...skipping 10 matching lines...) Expand all
425 429
426 private: 430 private:
427 UBiDi* bidi_; 431 UBiDi* bidi_;
428 432
429 DISALLOW_COPY_AND_ASSIGN(BiDiLineIterator); 433 DISALLOW_COPY_AND_ASSIGN(BiDiLineIterator);
430 }; 434 };
431 435
432 } 436 }
433 437
434 #endif // APP_L10N_UTIL_H_ 438 #endif // APP_L10N_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | app/l10n_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698