[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n-doc
Subject:    Re: gettext makes supporting multiple languages translations in ki18n impossible
From:       Albert Astals Cid <aacid () kde ! org>
Date:       2018-07-29 21:16:56
Message-ID: 170324247.4KFyMiuMjY () xps
[Download RAW message or body]

El diumenge, 29 de juliol de 2018, a les 22:26:56 CEST, Albert Astals Cid va \
escriure:
> El diumenge, 29 de juliol de 2018, a les 21:45:27 CEST, Karl Ove Hufthammer va \
> escriure:
> > Albert Astals Cid skreiv 29. juli 2018 19:31:
> > > Ideally one would be able to query gettext about whether the translation exists \
> > > or not (basically having an option to return nullptr in the above function or \
> > > similar), but I have not been able to find any such functionality in \
> > > glibc/libintl itself or in any other library out there.
> > 
> > According to comment #7 at https://bugs.kde.org/show_bug.cgi?id=168134, 
> > this is possible:
> > 
> > 
> > > […] how to know which language did the translation came from. Turned out that \
> > > raw gettext calls will return the same const char* pointer given to them if \
> > > there was no translation, as opposed to different pointer if the translation \
> > > was there, but same string-wise. Since i18n() uses these raw calls under the \
> > > hood, by this it can check the language.
> 
> 
> Right, that makes sense, i'll investigate.

https://phabricator.kde.org/D14473

> 
> Cheers,
> Albert
> 
> 
> 
> 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic