Template for merge pages in different Portuguese variants
Template for merge pages in different Portuguese variants
Hello!
I was thinking about Village pump/archive1#Page and Village pump/Archive3#PT and PT-BR translations, what for?, and then I've created Template:Language variation, which enables us to have only one subpage for Portuguese and then, in the rare cases where it is needed to use different words/sentencies in for those who has set 'pt' or 'pt-br' in their preferences, we can simply use the syntax
{{Language variation|pt= text more used in 'pt' (like "Ficheiro")|pt-br= text more used in 'pt-br' (like "Arquivo")}}
to get "text more used in 'pt' (like "Ficheiro")" or "text more used in 'pt-br' (like "Arquivo")", according to what the user selects in his preferences (or, after adapting Template:Languages, on the bar where it is shown the links for different languages).
I hope it to be useful to unify that pages.
(although I think the better is just to start the use language conversion also for Portuguese projects...).
If was not set any value for the parameter with the user language (or one of it's fallbacks), the template uses the parameter which corresponds to {{SUBPAGENAME}} (I'm supposing that at least "code=something" should be set in a page like "Page/code"). So, at "Page/pt", it is shown:
- the text passed to "pt-br=...", if the user choose "pt-br"
- the text passed to "pt=...", if the user choose "pt"
- the text passed to "pt=..." (because SUBPAGENAME is equals to "pt" in this case), if the user choose anything else (like Dutch).
(I just was not able to show this in the examples at Template:Language variation, because it has no "/code" in its title =) )
Maybe it is better to use {{GetFallback|{{SUBPAGENAME}}}}?
The template should be usable for other languages as well (for example to have en and en-gb at the same page, changin according to the user preferences).
By the way, I've added one line at Template:GetFallback