Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:02,308 --> 00:00:04,250
[Maximilian Schwarzm�ller] Now to conclude this module,
2
00:00:04,250 --> 00:00:07,550
there is one last special page I want to have a look at,
3
00:00:07,550 --> 00:00:10,320
and that's the 404 page.
4
00:00:10,320 --> 00:00:15,320
If I enter something slash something here,
5
00:00:15,550 --> 00:00:19,410
then I get the 404 page and a 404 error
6
00:00:19,410 --> 00:00:21,770
because we're not supporting that value.
7
00:00:21,770 --> 00:00:24,400
We're not supporting that path.
8
00:00:24,400 --> 00:00:28,460
Now, of course you might want to ship your own 404 page
9
00:00:28,460 --> 00:00:30,510
with your own content and style.
10
00:00:30,510 --> 00:00:32,850
And Next.js makes that easy.
11
00:00:32,850 --> 00:00:36,790
You just need to add a special file in your pages folder.
12
00:00:36,790 --> 00:00:39,570
So on the root level of your pages folder,
13
00:00:39,570 --> 00:00:44,310
next to this underscore app JS file and this index JS file,
14
00:00:44,310 --> 00:00:47,300
and here, in this folder,
15
00:00:47,300 --> 00:00:51,910
we now want to add a 404 dot JS file
16
00:00:51,910 --> 00:00:55,500
and it must be named like this because Next.js will
17
00:00:55,500 --> 00:00:58,510
then always load the component returned
18
00:00:58,510 --> 00:01:01,690
by this file or export it from this file
19
00:01:01,690 --> 00:01:05,489
when a 404 error arises.
20
00:01:05,489 --> 00:01:09,200
So here we can have our not found page
21
00:01:10,640 --> 00:01:15,640
and in there simply return a div where I say page not found.
22
00:01:15,660 --> 00:01:18,020
And of course the content is up to you.
23
00:01:18,020 --> 00:01:20,823
And then here I export this.
24
00:01:21,740 --> 00:01:24,950
And by doing that, by adding this page to special file,
25
00:01:24,950 --> 00:01:29,040
if I now reload local host free thousand slash something
26
00:01:29,040 --> 00:01:31,630
I see my custom not found page.
27
00:01:31,630 --> 00:01:33,853
So that is how you can customize that.
2166
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.