Skip to content

Commit ec9d6eb

Browse files
authored
fix: Added modules docs (#172)
1 parent d56f8f7 commit ec9d6eb

File tree

6 files changed

+1307
-4
lines changed

6 files changed

+1307
-4
lines changed

docs/modules/_i18n_d_.md

Lines changed: 215 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,215 @@
1+
[SmartApp](../classes/_smart_app_d_.smartapp.md)
2+
3+
### Namespaces
4+
5+
* [i18n](_i18n_d_.md#i18n)
6+
7+
## Namespaces
8+
9+
### i18n
10+
11+
**i18n**:
12+
13+
### ConfigurationOptions
14+
15+
**ConfigurationOptions**:
16+
17+
### `Optional` api
18+
19+
**api**? : *object*
20+
21+
Hash to specify different aliases for i18n's internal methods to apply on the request/response objects (method -> alias).
22+
Note that this will *not* overwrite existing properties with the same name.
23+
24+
**`default`** undefined
25+
26+
#### Type declaration:
27+
28+
* \[ **method**: *string*\]: string
29+
30+
### `Optional` autoReload
31+
32+
**autoReload**? : *boolean*
33+
34+
Watch for changes in json files to reload locale on updates
35+
36+
**`default`** false
37+
38+
### `Optional` cookie
39+
40+
**cookie**? : *string*
41+
42+
Sets a custom cookie name to parse locale settings from
43+
44+
**`default`** null
45+
46+
### `Optional` defaultLocale
47+
48+
**defaultLocale**? : *string*
49+
50+
Alter a site wide default locale
51+
52+
**`default`** "en"
53+
54+
### `Optional` directory
55+
56+
**directory**? : *string*
57+
58+
Where to store json files, relative to modules directory
59+
60+
**`default`** "./locales"
61+
62+
### `Optional` directoryPermissions
63+
64+
**directoryPermissions**? : *string*
65+
66+
Control mode on directory creation. Setting has no effect on win.
67+
68+
**`default`** null
69+
70+
### `Optional` extension
71+
72+
**extension**? : *string*
73+
74+
Setting extension of json files (you might want to set this to '.js' according to webtranslateit)
75+
76+
**`default`** ".json"
77+
78+
### `Optional` fallbacks
79+
80+
**fallbacks**? : *object*
81+
82+
Language fallback map
83+
84+
**`default`** {}
85+
86+
#### Type declaration:
87+
88+
* \[ **locale**: *string*\]: string
89+
90+
### `Optional` indent
91+
92+
**indent**? : *string*
93+
94+
What to use as the indentation unit
95+
96+
**`default`** "\t"
97+
98+
### `Optional` locales
99+
100+
**locales**? : *string[]*
101+
102+
Setup some locales - other locales default to en silently
103+
104+
**`default`** []
105+
106+
### `Optional` logDebugFn
107+
108+
**logDebugFn**? : *function*
109+
110+
Setting of log level DEBUG
111+
112+
**`default`** require("debug")("i18n:debug")
113+
114+
#### Type declaration:
115+
116+
▸ (`msg`: string): *void*
117+
118+
**Parameters:**
119+
120+
Name | Type |
121+
------ | ------ |
122+
`msg` | string |
123+
124+
### `Optional` logErrorFn
125+
126+
**logErrorFn**? : *function*
127+
128+
Setting of log level ERROR
129+
130+
**`default`** require("debug")("i18n:error")
131+
132+
#### Type declaration:
133+
134+
▸ (`msg`: string): *void*
135+
136+
**Parameters:**
137+
138+
Name | Type |
139+
------ | ------ |
140+
`msg` | string |
141+
142+
### `Optional` logWarnFn
143+
144+
**logWarnFn**? : *function*
145+
146+
Setting of log level WARN
147+
148+
**`default`** require("debug")("i18n:warn")
149+
150+
#### Type declaration:
151+
152+
▸ (`msg`: string): *void*
153+
154+
**Parameters:**
155+
156+
Name | Type |
157+
------ | ------ |
158+
`msg` | string |
159+
160+
### `Optional` objectNotation
161+
162+
**objectNotation**? : *boolean*
163+
164+
Enable object notation
165+
166+
**`default`** false
167+
168+
### `Optional` prefix
169+
170+
**prefix**? : *string*
171+
172+
Setting prefix of json files name (in case you use different locale files naming scheme (webapp-en.json), rather then just en.json)
173+
174+
**`default`** ""
175+
176+
### `Optional` preserveLegacyCase
177+
178+
**preserveLegacyCase**? : *boolean*
179+
180+
Downcase locale when passed on queryParam; e.g. lang=en-US becomes en-us.
181+
When set to false, the queryParam value will be used as passed; e.g. lang=en-US remains en-US.
182+
183+
**`default`** true
184+
185+
### `Optional` queryParameter
186+
187+
**queryParameter**? : *string*
188+
189+
Query parameter to switch locale (ie. /home?lang=ch)
190+
191+
**`default`** null
192+
193+
### `Optional` register
194+
195+
**register**? : *any*
196+
197+
object or [obj1, obj2] to bind the i18n api and current locale to
198+
199+
**`default`** null
200+
201+
### `Optional` syncFiles
202+
203+
**syncFiles**? : *boolean*
204+
205+
Sync locale information across all files
206+
207+
**`default`** false
208+
209+
### `Optional` updateFiles
210+
211+
**updateFiles**? : *boolean*
212+
213+
Whether to write new locale information to disk
214+
215+
**`default`** true

0 commit comments

Comments
 (0)