| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |