Talk:Localisation

Revision as of 05:16, 18 May 2024 by Svartava (talk | contribs) (Reverted edits by 2400:C600:3433:4566:1:0:EEE5:DC7D; if you disagree with this rollback, please leave a message on my talk-page.)

Latest comment: 2 years ago by TBurmeister (WMF) in topic Planning updates to this and related docs

Initial source

As noted in the edit summary, this from an exchange between Edward Z. Yang and Tim Starling from the wikitech-l mailing list, posted by User:Nickj. Nick - can you post confirmation here once you have got permission that they are happy to release this as GFDL. --HappyDog 01:08, 23 November 2006 (UTC)Reply

ISO 8601

where is the ISO 8601 bug report?

All bugs should be reported on Bugzilla. --HappyDog 13:20, 2 April 2007 (UTC)Reply

British English?

Is there any reason why this page is Internationalisation and not Internationalization? The text of the page itself as well as the text accompanying links like the one on Developer_hub use the z version as does Wikipedia (http://www.google.com/search?q=internationalization%20site:en.wikipedia.org vs http://www.google.com/search?q=internationalisation%20site:en.wikipedia.org). Don't really care which one is used. Well that's not true, I would prefer Internationalization. But regardless we should at least be consistent. --Cneubauer 02:35, 29 August 2007 (UTC)Reply

That's likeli becauze peoples automatikally type vot thei are uzed to, and mybee they don't recognise even that ther are differences ;-) --Purodha Blissenbach 00:31, 17 March 2009 (UTC)Reply

Article content Localisation

Greetings.

Is there any way to use Localisation to translate custom words inside an article content?

What about page title in the article content?

Thanks

Palanolho 17:58, 21 March 2011 (UTC)Reply

You should check IMSLP. They use a system of templates for that. But I'm not sure if that's the standard solution. --Micru 09:18, 30 January 2012 (UTC)Reply
There isn't any standard solution, several hacks have been used in the past. Now the Extension:Translate is providing a proper (albeit not complete yet) solution. This is offtopic for this page, by the way. Nemo 09:41, 30 January 2012 (UTC)Reply
@Nemo bis: Sorry I have to dig this outdated discussion, but isn't it now be feasible to convert this page to use Special:Translate? --Liuxinyu970226 (talk) 09:06, 20 November 2016 (UTC)Reply

{{GRAMMAR}} in JS

Is {{GRAMMAR}} working in JavaScript?  « Saper // talk »  02:55, 1 March 2012 (UTC)Reply

Font not working

Good day, when I open the Cree wikipedia (cr.wikipedia.org) from my work computer, I only see squares instead of Cree syllabics. First, I would like to know if that's normal or if that's bug. Second, would there be a way to fix that from the MediaWiki end since people on computers like that don't have access to change the settings of their browser or install new fonts (now I'm from a work computer, but same thing could happen from a computer in a library for example). I'm using Internet Explorer 7. I wasn't sure if that's the right place to ask that, if it isn't, could you please point me in the good direction. Thanks, Amqui (talk) 21:03, 14 September 2012 (UTC)Reply

Yes, it's a problem with your system, it works fine with GNU/Linux (fedora 17 here).
Extension:WebFonts#Adding a new language support should explain you how to fix that problem for all users; to enable it locally you'll need a separate bug with local consensus. Further questions should be asked on the extension's talk I think. --Nemo 21:31, 14 September 2012 (UTC)Reply

Coding convention on line length

What's the coding convention on how long lines should be? I notice that often, the lines in these i18n files go beyond 80-100 columns. Leucosticte (talk) 09:09, 18 October 2012 (UTC)Reply

Huge TOC

This TOC is huge. Please consider collapsing it, making it float or something. Of course the better solution would be to split all the content here in different pages, leaving in this one what is essential for (new) translators. We are pointing to this page from How to contribute, so a nicer landing for newcomers would be great. Any takers?--Qgil (talk) 22:13, 31 December 2012 (UTC)Reply

What's wrong with the TOC being long? What's important is that it's navigable. How to contribute links to the only section which is really relevant for translators, so they don't have to care about the TOC or the rest of the page (while they'd see the TOC if it was floating). --Nemo 22:39, 31 December 2012 (UTC)Reply
Updates to make this page function as more of a landing page, and to move much of the content into different pages, are now proposed (and tracked) in https://phabricator.wikimedia.org/T293776. TBurmeister (WMF) (talk) 23:09, 16 November 2021 (UTC)Reply

Namespace localisation

I tried to localize my custom namespace the way it is described in Localisation#Namespaces.

In my LocalSettings.php I defined:

...
define( 'NS_MYEXTENSION', 2750 );
...

And in my MyExtension.namespaces.php I defined:

<?php
$namespaceNames = array();
/** English */
$namespaceNames['en'] = array(
	NS_MYEXTENSION => 'MyExt'
);

/** German */
$namespaceNames['de'] = array(
	NS_MYEXTENSION => 'MeineErw'
);

I registered MyExtension.namespaces.php with $wgExtensionMessagesFiles, but the namespace was not available on the wiki.

When I added

...
$wgExtraNamespaces[NS_MYEXTENSION] = 'MyExt';
...

to my LocalSettings.php the namespace got accessbible by "MyExt:" prefix, but not by "MeineErw:".

Has anybody an idea what I'm doing wrong? --Osnard (talk) 08:57, 10 September 2013 (UTC)Reply

What's your wiki's language code? --Nemo 09:07, 10 September 2013 (UTC)Reply

Proposed additions to "Internationalization hints" section

Avoid using message strings generated by the browser

Not all MediaWiki languages are supported by any or all browsers. So strings generated by the browser may appear in a different language to the interface, or may use incompatible terms to the interface.

Avoid using message strings generated by CLDR

Not all MediaWiki languages are supported by CLDR.

Are the above proposed additions to the Localisation page advice correct? Lloffiwr (talk) 00:51, 2 December 2013 (UTC)Reply

(Context: bugzilla:57643#c11, bugzilla:56813.) Currently the direction taken seems to be the very opposite, so even if adopted those principles wouldn't reflect the reality. Before proposing them, you should try and get at least one such usage changed in the code. I'd suggest to (find someone able to) submit a patch directly, because bugzilla reports on such matters tend to focus on unproductive theoretical discussions about who should spend time doing what rather than on concrete issues and solutions. --Nemo 13:37, 3 December 2013 (UTC)Reply
Nemo:Are you able and willing to discuss these issues on some developer platform? Lloffiwr (talk) 11:31, 14 December 2013 (UTC)Reply
Sorry, I would have no idea where to start. Echo i18n issues, for instance, are intractable for me. It's better to start from some marginal corner of the codebase nobody cares about and then address controversial drama-prone "in the news" areas like Echo only after the dust settles down, IMHO. --Nemo 10:41, 15 December 2013 (UTC)Reply

Docs on when to use inContentLanguage()

Not sure if this is the best page for it, but we should have a guide for developers on when to use inContentLanguage(). Manual:Messages API mentions that it exists, while Manual:Language explains the distinction between the interface and content language well, but there's no specific guide for this and it's far from obvious. (Examples that come to my mind include messages used for autogenerated edit summaries, as well as messages defining page names like MediaWiki:Helppage, but there are surely more?) Matma Rex (talk) 17:15, 7 June 2014 (UTC)Reply

Location of "alias" and "namespaces"

Is it possible to locate the MyExtension.alias.php or MyExtension.namespaces.php in the /i18n/ folder? I am asking if this will break the process with tw.n? Thanks and cheers --[[kgh]] (talk) 21:20, 22 January 2015 (UTC)Reply

Here is the answer. Cheers --[[kgh]] (talk) 21:47, 26 January 2015 (UTC)Reply

Toc right and no floating text?

Why is the ToC at the right side and has a clear-element after it, so no text floats at the left side? It looks a bit strange with the free space at the left side. I suggest to move the toc to the left side, like it is on every page, or let the text float at the left side :) --Florianschmidtwelzow (talk) 11:30, 27 April 2015 (UTC)Reply

Are parentheses suitable as separators/clarifiers in all languages

We're discussing fixes for the flow timestamps (which currently just use "Relative time-ago", and flip to "Exact" time on mouseover). We definitely want to go back to using "Exact" as the default, with "Relative" as a tooltip.

However, if possible, we want to display both the "Exact" timestamp and the "Relative" timestamp for the first few days. Similar to the way Gmail does it for up to 2 weeks, by using parentheses - e.g. Nov 11 (1 day ago)

Someone mentioned concerns about using parentheses, for this task. The question is:

  • Are parentheses suitable as a universal separator (clarification indicator)? I.e. can the developers just use: $1 ($2)
Or must we use bulletpoint/dot/other as a separator, instead? E.g. $1 • $2
Or is there a third and preferred method we haven't considered?

I saw the section here at Localisation#Symbols, colons, brackets, etc. are parts of messages, which seems to indicate that it is completely OK to use parentheses. I also tried checking special:watchlist?uselang=foo in a few dozen non-latin scripts, and they all appeared to use parentheses in various places. So I think it is acceptable to just use $1 ($2) style format, but confirmation/correction would be appreciated. Thanks. Quiddity (WMF) (talk) 19:59, 12 November 2015 (UTC)Reply

Parentheses must not be hardcoded. Either they are part of a message and are translatable as such, or they must be inserted via the "parentheses" system message (like this). --Nemo 20:04, 12 November 2015 (UTC)Reply

Languages that use non-arabic numerals in their ToC

Just FYI, for now...

I noticed the Burmese Wikipedia uses non-arabic numerals in the ToC. This made me think of my global.css which tweaks the colors/size of these numbers and adds a dot-suffix (which I was previous-to-this hoping would be an easy improvement for all wikis...). screenshot comparison. So, I asked for help finding other languages which use non-arabic numerals. Here's what I learned:

Based on https://phabricator.wikimedia.org/diffusion/MW/browse/master/languages/messages/?grep=digitTransformTable
but without the false-positives of: Ar, Arq, Arz, As, Hi;
and the unverifiable(?): Bho, Kk_arab, Ks_arab, Ks_deva, Ku_arab.

Hope that helps someone! (Move this elsewhere, if there's somewhere better). –Quiddity (talk) 19:29, 30 January 2016 (UTC)Reply

For variants you have to choose them in the settings. There are no false positives, see Manual:$wgTranslateNumerals. Nemo 20:50, 30 January 2016 (UTC)Reply
Nod, I've struck out my earlier incorrect lines, and tried to add the variants detail to the list in a way that is clear and accurate - is it? Context: I'm wondering if we can add some more details to Manual:$wgTranslateNumerals, to help future developers who are new to this (and also to update the incomplete list of 2 languages it currently has). I've taken a swing at it, with this edit, but please revert/correct/improve etc! –Quiddity (talk) 18:35, 2 April 2016 (UTC)Reply
Your edit is good, thanks. At some point however, if you want to add many more examples, it would make more sense as its own Wikipedia or Wikibooks page on localised numerals. :) Nemo 09:10, 3 April 2016 (UTC)Reply

Gender magic word

In my opinion Gender magic word should work in Help namespace too. I created a task on Phabricator. --Dvorapa (talk) 15:36, 13 June 2016 (UTC)Reply

Third World languages

This section makes reference to "non-technical third world languages", which is unacceptable prejudice. What is a Third World language? There are Native languages in "First World" countries that are also non-technical in nature. Can someone please rewrite this sentence? Thanks, Capmo (talk) 18:33, 21 June 2020 (UTC)Reply

@Capmo I rephrased this sentence: [1]. Matma Rex (talk) 14:31, 22 June 2020 (UTC)Reply
Thank you, it's much better now! I was afraid to edit the page and mess up with the translation tags. Capmo (talk) 14:36, 22 June 2020 (UTC)Reply

en-gb and en-ca translations

I'm wondering if there's documentation anywhere, which explains when editors should or shouldn't translate [documentation/mass-messages/etc] from "en" into "en-gb" or "en-ca"? I vaguely remember that we discourage it, but I'm not certain about the exact reasons.

Context: I wanted to suggest to an editor that they not spend any time making en-gb translations of a newsletter in the future, and I was hoping for some documentation to point them towards that explained these points (and more?).

IIUC, from memory, these are the issues...

  1. en-gb/en-ca are primarily used for technical testing of language variants and language fallbacks, [?]
  2. it is probably not a "best use" of anyone's limited time to translate into these variants,
  3. translating pages into these languages over-emphasizes English within the "Other languages" box (by making it appear multiple times and inherently near the start of the list),
  4. there is no good way to deliver mass-messages in en-gb/en-ca (unless the whole wiki is configured to have one of those as the default),
  5. unlike many (most?) other language variants, there are very few significant differences for these 3. [As a dual GB/CA citizen, I can say that!]
  6. it can lead to problems like phab:T162008, and also to the related small risk of outdated translations overriding more uptodate defaults.

If there isn't any existing documentation: Are the 6 reasons in my understanding accurate? Are there any additional reasons? And where could/should we document it all? Thank you! [Hopefully I'm not opening a "can of worms" here, though I do understand there are many many complexities surrounding this topic]. Pinging @Nikerabbit: for any insights. Quiddity (WMF) (talk) 04:35, 21 July 2020 (UTC)Reply

It depends on the context. For page translation, I doubt there are any target pages using page language of en-gb or en-ca, so those translations would not be delivered anywhere with MassMessage. Of course one can still view those translation pages directly, if they exist. In general translation to en-ca or en-gb should not be needed for comprehension in technical documentation (as opposed to natural spoken language).
I am not certain how much of these changes could be done automatically (certainly many lexical differences would be quite easy).
In any case, while in this context there isn't really benefit to translate to these languages, having them there doesn't seem to be a big problem. Improved language selection (which may happen) for translatable pages would make the issue you point mostly moot. Nikerabbit (talk) 12:43, 21 July 2020 (UTC)Reply

Cleanup local messages tool did not work for Telugu

In the section Localisation#Old_local_translation_system, the link for https://toolserver.org/~robin/?tool=cleanuplocalmsgs link did not work for Telugu wikipedia. The error was

Going to compare local message pages on te.wikipedia.org to the default te localisation (Allmessages; Allpages)
Doing basic query to check API availability ... Something's wrong with the API. Maybe the site does not exist?

--Arjunaraoc (talk) 06:56, 13 November 2021 (UTC)Reply

@SPQRobin: Do you know something about it? Is maybe the source code available somewhere so that others can help fix the bug? —Tacsipacsi (talk) 17:24, 13 November 2021 (UTC)Reply

As part of work on the mw:Developer_Advocacy/Developer_Portal, I've been reviewing this page and identifying ways to improve its utility as a landing page / entry point into the localisation / i18n docs. If you're interested in contributing to or staying updated about this work, please reach out or follow https://phabricator.wikimedia.org/T293776 TBurmeister (WMF) (talk) 14:59, 17 November 2021 (UTC)Reply

-- I have now moved content from this page to subpages as outlined in T293776; it's the end of the working day for me now but tomorrow I will review all these changes more closely to try to correct broken links and anchors, and fix other nuances that these major content moves may have made problematic. TBurmeister (WMF) (talk) 22:46, 9 December 2021 (UTC)Reply

Return to "Localisation" page.