From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: gettext for Ada Date: Thu, 23 Nov 2017 10:47:25 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <2c5d0dff-bc12-4b37-b8e1-ac176c3e675f@googlegroups.com> <87r2sszr4f.fsf@jacob-sparre.dk> <0d02d48a-112f-4817-ab29-6dded00eb81f@googlegroups.com> <87mv3fzbn9.fsf@jacob-sparre.dk> <87efopz77r.fsf@jacob-sparre.dk> NNTP-Posting-Host: MyFhHs417jM9AgzRpXn7yg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 X-Notice: Filtered by postfilter v. 0.8.2 Content-Language: en-US Xref: feeder.eternal-september.org comp.lang.ada:49102 Date: 2017-11-23T10:47:25+01:00 List-Id: On 23/11/2017 10:15, Jacob Sparre Andersen wrote: > Dmitry A. Kazakov wrote: >> On 2017-11-21 20:15, Jacob Sparre Andersen wrote: >>> Dmitry A. Kazakov wrote: > >>>> That does not apply to Ada which is typed. In Ada I would do: >>>> >>>> X : Meats := 1; >>>> >>>> Put_Line ("You have" & Image (X)); >>>> >>>> and Image (Meats) will produce "1 meat". >>> >>> This makes perfect sense - if you're only going to communicate in >>> English. I can't see how you can extrapolate that to multiple >>> languages. And definitely not multiple languages added dynamically >>> after compiling the program. >> >> The only thing you need to change is Image for String argument: >> >> Put_Line (Image ("You have") & Image (X)); >> >> Image will make lookup for "You have" in the translation table. So >> will do Image for Meats when looking for "meat" and "meats". > > That assumes that all the languages you translate to have the same word > order. I don't think that is realistic. It translates whole part of the sentence, e.g. Default -> Locale "You have" -> "Du hast" "You have" -> "У тебя есть" -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de