Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multilingual setup and org-hugo-citations-plist setting as local variable doesn't work #574

Closed
madanyang opened this issue Feb 27, 2022 · 7 comments · Fixed by #575
Closed

Comments

@madanyang
Copy link

madanyang commented Feb 27, 2022

Hi,

I'm using ox-hugo with multi-lingual Hugo theme and the limitation of org-hugo-citations-plist not being local-varible is slowing me down.

In order to produce the org-hugo-citations-plist :bibliography-section-heading in the language of the document I need to manually evaluate (plist-put org-hugo-citations-plist :bibliography-section-heading "Desired Language") so I can change the output of the bibliography section heading according to the document language I am working at that time.

When I place the following nothing happens if the previous heading was set to something else

#+print_bibliography:
* COMMENT Local Variables                          :ARCHIVE:
# Local Variables:
# eval: (plist-put org-hugo-citations-plist :bibliography-section-heading "Kaynakça")
# eval: (org-hugo-auto-export-mode)
# End:

org-hugo-citations-plist are cons of string so it should be safe to include as a local variable. I am doing this wrong or is this a bug or missing feature.

@kaushalmodi
Copy link
Owner

kaushalmodi commented Feb 27, 2022

Thanks. I think I'll implement a way to use the org-export-dictionary map from ox.el to translate "References" to the right language detected by the #+language: keyword in the buffer.

As of now, I am not seeing Turkish translations in that variable in ox.el. You can either set those translations in your emacs config, or better yet, suggest the translations in the Org mode mailing list.

@madanyang
Copy link
Author

line 6065 ("tr" :default "Referanslar")) is what is there in org version 9.5.2-gfbff08 that comes from gnu. My choice is another alternative. I'll try and see what happens. Neverhteless it should not be limited to language and one other thing where does this <style> coming from and if it is from ox-hugo that weird as that is the reason of using a static generator hugo theme should handle it

@kaushalmodi
Copy link
Owner

kaushalmodi commented Feb 27, 2022

My choice is another alternative.

You can then customize the org-export-dictionary in your emacs config. It won't work though until I use it for References. I am tracking that in this issue.

where does this <style> coming from

From citeproc.el.

@madanyang
Copy link
Author

Thanks for the info. I might be wrong but looks like not many people are doing multilingual in a single document.

@kaushalmodi
Copy link
Owner

@madanyang Once is #575 merged, you can get the translation as you intend by adding this to your Emacs config:

(with-eval-after-load 'ox
  (setcdr (assoc "tr" (assoc "References" org-export-dictionary)) '(:default "Kaynakça")))

kaushalmodi added a commit that referenced this issue Feb 28, 2022
Add multi-lang support for Bibliography/References heading.

Fixes #574.
@kaushalmodi
Copy link
Owner

@madanyang This issue is auto-closed by that merge. But feel free to comment here further.

@kaushalmodi
Copy link
Owner

I have also added a page in the ox-hugo manual for multi-lingual support: https://ox-hugo.scripter.co/doc/multi-lingual-support/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants