1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,70 +0,0 @@ |
1 |
-<?php |
|
2 |
- |
|
3 |
-/* |
|
4 |
- * This file is part of the Symfony package. |
|
5 |
- * |
|
6 |
- * (c) Fabien Potencier <fabien@symfony.com> |
|
7 |
- * |
|
8 |
- * For the full copyright and license information, please view the LICENSE |
|
9 |
- * file that was distributed with this source code. |
|
10 |
- */ |
|
11 |
- |
|
12 |
-namespace Symfony\Component\Translation; |
|
13 |
- |
|
14 |
-use Symfony\Component\Translation\Exception\InvalidArgumentException; |
|
15 |
-use Symfony\Contracts\Translation\LocaleAwareInterface; |
|
16 |
- |
|
17 |
-/** |
|
18 |
- * TranslatorInterface. |
|
19 |
- * |
|
20 |
- * @author Fabien Potencier <fabien@symfony.com> |
|
21 |
- * |
|
22 |
- * @deprecated since Symfony 4.2, use Symfony\Contracts\Translation\TranslatorInterface instead |
|
23 |
- */ |
|
24 |
-interface TranslatorInterface extends LocaleAwareInterface |
|
25 |
-{ |
|
26 |
- /** |
|
27 |
- * Translates the given message. |
|
28 |
- * |
|
29 |
- * @param string $id The message id (may also be an object that can be cast to string) |
|
30 |
- * @param array $parameters An array of parameters for the message |
|
31 |
- * @param string|null $domain The domain for the message or null to use the default |
|
32 |
- * @param string|null $locale The locale or null to use the default |
|
33 |
- * |
|
34 |
- * @return string The translated string |
|
35 |
- * |
|
36 |
- * @throws InvalidArgumentException If the locale contains invalid characters |
|
37 |
- */ |
|
38 |
- public function trans($id, array $parameters = [], $domain = null, $locale = null); |
|
39 |
- |
|
40 |
- /** |
|
41 |
- * Translates the given choice message by choosing a translation according to a number. |
|
42 |
- * |
|
43 |
- * @param string $id The message id (may also be an object that can be cast to string) |
|
44 |
- * @param int $number The number to use to find the index of the message |
|
45 |
- * @param array $parameters An array of parameters for the message |
|
46 |
- * @param string|null $domain The domain for the message or null to use the default |
|
47 |
- * @param string|null $locale The locale or null to use the default |
|
48 |
- * |
|
49 |
- * @return string The translated string |
|
50 |
- * |
|
51 |
- * @throws InvalidArgumentException If the locale contains invalid characters |
|
52 |
- */ |
|
53 |
- public function transChoice($id, $number, array $parameters = [], $domain = null, $locale = null); |
|
54 |
- |
|
55 |
- /** |
|
56 |
- * Sets the current locale. |
|
57 |
- * |
|
58 |
- * @param string $locale The locale |
|
59 |
- * |
|
60 |
- * @throws InvalidArgumentException If the locale contains invalid characters |
|
61 |
- */ |
|
62 |
- public function setLocale($locale); |
|
63 |
- |
|
64 |
- /** |
|
65 |
- * Returns the current locale. |
|
66 |
- * |
|
67 |
- * @return string The locale |
|
68 |
- */ |
|
69 |
- public function getLocale(); |
|
70 |
-} |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,70 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+/* |
|
4 |
+ * This file is part of the Symfony package. |
|
5 |
+ * |
|
6 |
+ * (c) Fabien Potencier <fabien@symfony.com> |
|
7 |
+ * |
|
8 |
+ * For the full copyright and license information, please view the LICENSE |
|
9 |
+ * file that was distributed with this source code. |
|
10 |
+ */ |
|
11 |
+ |
|
12 |
+namespace Symfony\Component\Translation; |
|
13 |
+ |
|
14 |
+use Symfony\Component\Translation\Exception\InvalidArgumentException; |
|
15 |
+use Symfony\Contracts\Translation\LocaleAwareInterface; |
|
16 |
+ |
|
17 |
+/** |
|
18 |
+ * TranslatorInterface. |
|
19 |
+ * |
|
20 |
+ * @author Fabien Potencier <fabien@symfony.com> |
|
21 |
+ * |
|
22 |
+ * @deprecated since Symfony 4.2, use Symfony\Contracts\Translation\TranslatorInterface instead |
|
23 |
+ */ |
|
24 |
+interface TranslatorInterface extends LocaleAwareInterface |
|
25 |
+{ |
|
26 |
+ /** |
|
27 |
+ * Translates the given message. |
|
28 |
+ * |
|
29 |
+ * @param string $id The message id (may also be an object that can be cast to string) |
|
30 |
+ * @param array $parameters An array of parameters for the message |
|
31 |
+ * @param string|null $domain The domain for the message or null to use the default |
|
32 |
+ * @param string|null $locale The locale or null to use the default |
|
33 |
+ * |
|
34 |
+ * @return string The translated string |
|
35 |
+ * |
|
36 |
+ * @throws InvalidArgumentException If the locale contains invalid characters |
|
37 |
+ */ |
|
38 |
+ public function trans($id, array $parameters = [], $domain = null, $locale = null); |
|
39 |
+ |
|
40 |
+ /** |
|
41 |
+ * Translates the given choice message by choosing a translation according to a number. |
|
42 |
+ * |
|
43 |
+ * @param string $id The message id (may also be an object that can be cast to string) |
|
44 |
+ * @param int $number The number to use to find the index of the message |
|
45 |
+ * @param array $parameters An array of parameters for the message |
|
46 |
+ * @param string|null $domain The domain for the message or null to use the default |
|
47 |
+ * @param string|null $locale The locale or null to use the default |
|
48 |
+ * |
|
49 |
+ * @return string The translated string |
|
50 |
+ * |
|
51 |
+ * @throws InvalidArgumentException If the locale contains invalid characters |
|
52 |
+ */ |
|
53 |
+ public function transChoice($id, $number, array $parameters = [], $domain = null, $locale = null); |
|
54 |
+ |
|
55 |
+ /** |
|
56 |
+ * Sets the current locale. |
|
57 |
+ * |
|
58 |
+ * @param string $locale The locale |
|
59 |
+ * |
|
60 |
+ * @throws InvalidArgumentException If the locale contains invalid characters |
|
61 |
+ */ |
|
62 |
+ public function setLocale($locale); |
|
63 |
+ |
|
64 |
+ /** |
|
65 |
+ * Returns the current locale. |
|
66 |
+ * |
|
67 |
+ * @return string The locale |
|
68 |
+ */ |
|
69 |
+ public function getLocale(); |
|
70 |
+} |