All language subtitles for 002 Title Template_en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

We're now exporting a "metadata"

object for our HomePage,

setting the "title",

that we can also see in the browser tab.

But, since we only set it in the HomePage,

obviously it won't apply to other pages.

You can see that for the About page

the browser just shows the URL in the tab name,

and same if we look at the

Reviews page for example.

Only the Home page has a title.

Now, we could add some metadata to each page,

like about,

but we can also add it to the layout,

and it will then apply to all pages.

Let's move this metadata out of the HomePage,

and note that, if we save this change,

the HomePage will no longer show a title.

But now let's go and paste the "metadata"

object into the RootLayout.

And if we save,

the HomePage will have a title again.

But it won't be just the HomePage this time.

If we look at the About page,

we need to reload it, because

of the browser cache,

but you can see that this one

also has the same title.

And of course it will be the same

on the Reviews page as well.

So, putting the "metadata" in the RootLayout

is a good way to set default values

that apply to all pages.

But then we may still want a more

specific "title" for some pages.

For example, let's provide some custom

"metadata" for the AboutPage,

and here we can override the "title"

to say "About" instead.

This way, most pages will still have

"Indie Gamer" as the title,

because that's the default set in the RootLayout,

but if we look at the About page,

this one has its own different title.

So each page can effectively override

the default values set in the layout.

Now, when writing the "title" for a page,

it's common practice to always

include the website name,

in our case "Indie Gamer",

in addition to the page-specific name.

This is useful both for users,

so they can easily tell which

site each tab belongs to,

and for Search Engine Optimization.

But this means we would need to duplicate

this "Indie Gamer" string

in all the pages where we set a custom title.

To avoid this, Next.js provides

a way to define a template.

Instead of setting the "title" as a string,

we can use an object, that has a "default" value.

And then we can add a "template" property

where we can write "%s" followed by "Indie Gamer".

"%s" here is a placeholder

that will be replaced by the page-specific title.

Let's see how it works now.

You can see that the About page shows

"About" followed by "Indie Gamer" twice.

That's because, in the AboutPage,

we were already appending "Indie Gamer",

but if we remove it,

the title is now "About | Indie Gamer".

So, it's inserting the title from this page

into the template string we

defined in the RootLayout.

This means we can more easily set

a custom title on other pages,

like the ReviewsPage.

We can simply change it to "Reviews" here,

and if we save,

the Reviews page should update, if we reload it,

and display "Reviews" followed by "Indie Gamer".

So the template always appends the

website name automatically.

It's a simple feature, but it's quite useful.

Note that the "default" value will still apply

to any page that doesn't have a custom title,

like the HomePage for example.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.